Changeset 12098
- Timestamp:
- 08/13/09 13:14:58 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/defstruct.lisp
r12078 r12098 345 345 (t 346 346 `((declaim (ftype (function * ,type) ,accessor-name)) 347 (defun ,accessor-name (instance) (structure-ref instance ,index)) 347 (defun ,accessor-name (instance) 348 (structure-ref (the ',*dd-name* instance) ,index)) 348 349 (define-source-transform ,accessor-name (instance) 349 350 ,(if (eq type 't) 350 ``(structure-ref ,instance ,,index) 351 ``(the ,',type (structure-ref ,instance ,,index))))))))) 351 ``(structure-ref (the ,',*dd-name* ,instance) ,,index) 352 ``(the ,',type 353 (structure-ref (the ,',*dd-name* ,instance) ,,index))))))))) 352 354 353 355 (defun define-writer (slot) … … 369 371 (t 370 372 `((defun (setf ,accessor-name) (value instance) 371 (structure-set instance,index value))373 (structure-set (the ',*dd-name* instance) ,index value)) 372 374 (define-source-transform (setf ,accessor-name) (value instance) 373 `(structure-set ,instance ,,index ,value))))))) 375 `(structure-set (the ,',*dd-name* ,instance) 376 ,,index ,value))))))) 374 377 375 378 (defun define-access-functions ()
Note: See TracChangeset
for help on using the changeset viewer.