[armedbear-cvs] r13188 - trunk/abcl/src/org/armedbear/lisp

Erik Huelsmann ehuelsmann at common-lisp.net
Thu Jan 27 22:48:11 UTC 2011


Author: ehuelsmann
Date: Thu Jan 27 17:48:10 2011
New Revision: 13188

Log:
Fix DEFSTRUCT trying to generate accessors named NIL.

Note: Especially in case of LIST type structures,
DEFSTRUCT generates fake slot definitions with name NIL.

Modified:
   trunk/abcl/src/org/armedbear/lisp/defstruct.lisp

Modified: trunk/abcl/src/org/armedbear/lisp/defstruct.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/defstruct.lisp	(original)
+++ trunk/abcl/src/org/armedbear/lisp/defstruct.lisp	Thu Jan 27 17:48:10 2011
@@ -375,10 +375,11 @@
   (let ((result ()))
     (dolist (slot *dd-slots*)
       (let ((accessor-name (dsd-reader slot)))
-        (unless (assoc accessor-name *dd-inherited-accessors*)
-          (setf result (nconc result (define-reader slot)))
-          (unless (dsd-read-only slot)
-            (setf result (nconc result (define-writer slot)))))))
+        (unless (null accessor-name)
+          (unless (assoc accessor-name *dd-inherited-accessors*)
+            (setf result (nconc result (define-reader slot)))
+            (unless (dsd-read-only slot)
+              (setf result (nconc result (define-writer slot))))))))
     result))
 
 (defun define-copier ()




More information about the armedbear-cvs mailing list