From 0a845037e0381f7d2cd9450170a8150b4d6400b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Tom=C3=A1s?= Date: Fri, 3 Feb 2023 15:19:39 -0300 Subject: Fix generation of objects --- generate.lisp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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))) -- cgit v1.2.3