diff options
author | Juan Manuel Tomás <jtomas1815@gmail.com> | 2023-02-03 15:19:39 -0300 |
---|---|---|
committer | Juan Manuel Tomás <jtomas1815@gmail.com> | 2023-02-03 15:19:39 -0300 |
commit | 0a845037e0381f7d2cd9450170a8150b4d6400b0 (patch) | |
tree | a570a180b1e8fd6cd6edfd76e42c4bed65d29ba3 /generate.lisp | |
parent | fdeb8e5de32f21a4a016b99165d248a7d8c3abde (diff) | |
download | json-0a845037e0381f7d2cd9450170a8150b4d6400b0.tar.gz json-0a845037e0381f7d2cd9450170a8150b4d6400b0.zip |
Fix generation of objects
Diffstat (limited to 'generate.lisp')
-rw-r--r-- | generate.lisp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/generate.lisp b/generate.lisp index de213a4..8bb93e7 100644 --- a/generate.lisp +++ b/generate.lisp @@ -3,7 +3,8 @@ (defmacro obj (&rest fields) (let ((o (gensym)) (f (gensym))) + (setf fields (mapcar (lambda (x) (cons 'list x)) fields)) `(let ((,o (make-hash-table :test #'equal :size ,(length fields)))) - (dolist (,f ',fields) + (dolist (,f ,(cons 'list fields)) (setf (gethash (car ,f) ,o) (cadr ,f))) ,o))) |