# HG changeset patch # User Steve Losh # Date 1529278137 25200 # Node ID 0dd5e94be86ba08aabd1d5d8d2f0a80fa9e80aa4 # Parent de9d10a9b4b5085e25cd82bcd8748db3f59211b5 Get ABCL to shut up about unused gensyms diff -r de9d10a9b4b5 -r 0dd5e94be86b src/hash-sets.lisp --- a/src/hash-sets.lisp Sun Jun 17 16:20:05 2018 -0700 +++ b/src/hash-sets.lisp Sun Jun 17 16:28:57 2018 -0700 @@ -2,7 +2,7 @@ (defstruct (hash-set (:constructor make-hash-set%) (:copier nil)) - (storage (error "Required") :type hash-table :read-only t)) + (storage (error "Required") :type hash-table)) (defmethod print-object ((hset hash-set) stream) (print-unreadable-object (hset stream :type t :identity t) @@ -37,15 +37,15 @@ (defmacro define-hset-op (name arglist &body body) (let* ((has-docstring (stringp (first body))) (docstring (if has-docstring - (first body) - "")) + (first body) + "")) (body (if has-docstring (rest body) body))) `(defun ,name ,arglist - ,docstring - (with-slots (storage) ,(first arglist) - ,@body)))) + ,docstring + (symbol-macrolet ((storage (hash-set-storage ,(first arglist)))) + ,@body)))) (define-hset-op hset-empty-p (hset)