Groups
Groups
Sign in
Groups
Groups
sbcl-help-archive
Conversations
About
Send feedback
Help
[Sbcl-help] defmacro / find-class
0 views
Skip to first unread message
syll-dev via Sbcl-help
unread,
Mar 12, 2023, 12:24:28 PM
3/12/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sbcl
Hello
The following code does run correctly in a file loaded with (load
"code.lisp") but not in a project using asdf.
(defmacro m (class-name)
(let* ((class (find-class class-name))
(slots (progn
(unless (sb-mop:class-finalized-p class)
(sb-mop:finalize-inheritance class))
(mapcar #'sb-mop:slot-definition-name (sb-mop:class-
slots class)))))
`(print ',slots)))
(defclass c ()
(a
b))
(m c)
find-class does not find the class. Probably the same bug that is
described here ?
https://bugs.launchpad.net/sbcl/+bug/1669030
https://bugs.launchpad.net/sbcl/+bug/310120
https://bugs.launchpad.net/sbcl/+bug/309140
Is there another way to access the class in the macro without separating
defclass et the use of the macro in two files ?
syll
_______________________________________________
Sbcl-help mailing list
Sbcl...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-help
Reply all
Reply to author
Forward
0 new messages