Changeset 10408


Ignore:
Timestamp:
Aug 9, 2008, 1:52:51 PM (11 years ago)
Author:
gb
Message:

Try to handle the (forthcoming) new scheme and the old in STRUCT-NAME,
STRUCT-DEF.

New images soon.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lib/defstruct-macros.lisp

    r2325 r10408  
    8181(defmacro sd-refnames (sd) `(svref ,sd 6))
    8282
    83 (defmacro struct-name (struct) `(car (uvref ,struct 0)))
    84 (defmacro struct-def (struct) `(gethash (car (uvref ,struct 0)) %defstructs%))
     83(defmacro struct-name (struct)
     84  (let* ((temp (gensym)))
     85    `(let* ((,temp (car (uvref ,struct 0))))
     86      (if (istruct-typep ,temp 'class-cell)
     87        (class-cell-name ,temp)
     88        ,temp))))
     89
     90(defmacro struct-def (struct) `(gethash (struct-name ,struct) %defstructs%))
    8591
    8692;Can use this to let the printer print with print-function, reader read with
Note: See TracChangeset for help on using the changeset viewer.