~ubuntu-branches/ubuntu/intrepid/ecl/intrepid

« back to all changes in this revision

Viewing changes to src/lsp/defstruct.lsp

  • Committer: Bazaar Package Importer
  • Author(s): Peter Van Eynde
  • Date: 2007-04-09 11:51:51 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070409115151-ql8cr0kalzx1jmla
Tags: 0.9i-20070324-2
Upload to unstable. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
           ;;  the slot is at the offset in the structure-body.
40
40
           (fset access-function #'(lambda (x)
41
41
                                     (sys:structure-ref x name offset))))
42
 
          ((subtypep type 'VECTOR)
43
 
           ;; If TYPE is VECTOR or (VECTOR ... ), ELT is used.
 
42
          ((subtypep type '(OR LIST VECTOR))
 
43
           ;; If TYPE is VECTOR, (VECTOR ... ) or LIST, ELT is used.
44
44
           (fset access-function
45
45
                 #'(lambda (x) (elt x offset))))
46
 
          ((eq type 'LIST)
47
 
           ;; If TYPE is LIST, NTH is used.
48
 
           (fset access-function
49
 
                 #'(lambda (x) (sys:list-nth offset x))))
50
46
          (t (error "~S is an illegal structure type." type)))
51
47
    (if read-only
52
48
        (progn