Changeset 4818


Ignore:
Timestamp:
11/18/03 01:06:58 (18 years ago)
Author:
piso
Message:

Work in progress.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/defstruct.lisp

    r4817 r4818  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: defstruct.lisp,v 1.28 2003-11-18 00:50:48 piso Exp $
     4;;; $Id: defstruct.lisp,v 1.29 2003-11-18 01:06:58 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    6666
    6767
    68 (defmacro get-slot-accessor (slot type)
    69   (case type
     68(defun get-slot-accessor (slot)
     69  (case *ds-type*
    7070    (LIST
    7171     `(lambda (instance) (elt instance ,slot)))
     
    7878        `(lambda (instance) (%structure-ref instance ,slot)))))))
    7979
    80 (defmacro get-slot-mutator (slot type)
    81   (case type
     80(defun get-slot-mutator (slot)
     81  (case *ds-type*
    8282    (LIST
    8383     `(lambda (instance value) (%set-elt instance ,slot value)))
     
    9595             (intern (concatenate 'string (symbol-name *ds-conc-name*) (symbol-name slot-name)))
    9696             slot-name)))
    97     `((setf (symbol-function ',accessor) (get-slot-accessor ,index ,*ds-type*))
    98       (%put ',accessor 'setf-inverse (get-slot-mutator ,index ,*ds-type*)))))
     97    `((setf (symbol-function ',accessor) ,(get-slot-accessor index))
     98      (%put ',accessor 'setf-inverse ,(get-slot-mutator index )))))
    9999
    100100(defun define-access-functions (slots)
Note: See TracChangeset for help on using the changeset viewer.