Ignore:
Timestamp:
Apr 20, 2005, 6:53:08 AM (14 years ago)
Author:
gb
Message:

Changes to how some things are encoded in .cdb files; field offsets and widths
are now provided explicitly. This will require new .cdb files and is a little
hard to bootstrap ...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/library/parse-ffi.lisp

    r1153 r1161  
    394394      (let* ((field-name (escape-foreign-name (car field)))
    395395             (field-descr (cadr field)))
    396         (push (list field-name
    397                     (ecase (car field-descr)
    398                       (:field (reference-ffi-type (cadr field-descr)))
    399                       (:bit-field `(:primitive (:unsigned ,(nth 3 (nth 4 field-descr)))))
    400                       (:bitfield `(:primitive (:unsigned ,(car (last field-descr)))))))
    401               parsed-fields)))))
     396        (destructuring-bind (field-type offset width)
     397            (cdr field-descr)
     398          (push (cons field-name
     399                      (ecase (car field-descr)
     400                        (:field `(,(reference-ffi-type field-type) ,(ash offset 3) ,(ash width 3)))
     401                        (:bitfield `((:primitive (:unsigned ,width)) ,offset ,width))))
     402                parsed-fields))))))
    402403
    403404(defun process-ffi-union (form)
Note: See TracChangeset for help on using the changeset viewer.