[Openmcl-devel] How to get names of slots of a structure?
kevin at rosenberg.net
Mon Oct 21 02:53:15 UTC 2002
Gary Byers wrote:
> ;;; I -think- this is right ...
> ;;; You may or may not be interested in the shared (class) slot names.
> ;;; This should work the same way in both commercial MCL and OpenMCL.
> (defun class-slot-names (class-name)
> (let* ((class (find-class class-name nil)))
> (when (typep class 'standard-class)
> (append (map 'list #'car (ccl::%class-instance-slotds class))
> (map 'list #'car (ccl::%class-shared-slotds class))))))
That works perfectly. Thanks so much!
Kevin Rosenberg | .''`. ** Debian GNU/Linux **
http://b9.com/debian.html | : :' : The universal
GPG signed and encrypted | `. `' Operating System
messages accepted. | `- http://www.debian.org/
Openmcl-devel mailing list
Openmcl-devel at clozure.com
More information about the Openmcl-devel