Changeset 337
- Timestamp:
- Jan 19, 2004, 4:37:57 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/ccl/lib/foreign-types.lisp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/lib/foreign-types.lisp
r323 r337 985 985 (overall-alignment 1) 986 986 (parsed-fields nil) 987 #+poweropen-target 988 (first-field-p t) 987 989 (alt-alignment (foreign-record-type-alt-align result))) 988 990 (dolist (field fields) … … 994 996 (alignment (if alt-alignment 995 997 (min natural-alignment alt-alignment) 998 #+poweropen-target 999 (if first-field-p 1000 (progn 1001 (setq first-field-p nil) 1002 natural-alignment) 1003 (min 32 natural-alignment)) 1004 #-poweropen-target 996 1005 natural-alignment)) 997 1006 (parsed-field … … 1281 1290 (reduce #'* dims)))))))) 1282 1291 1292 (defun %find-foreign-record (name) 1293 (or (info-foreign-type-struct name) 1294 (info-foreign-type-union name) 1295 (load-record name))) 1296 1297 1283 1298 (defun %foreign-type-or-record (type) 1284 1299 (if (consp type) 1285 1300 (parse-foreign-type type) 1286 (or (info-foreign-type-struct type) 1287 (info-foreign-type-union type) 1288 (load-record type) 1301 (or (%find-foreign-record type) 1289 1302 (parse-foreign-type type)))) 1290 1291 1303 1292 1304 (defun %foreign-type-or-record-size (type &optional (units :bits)) … … 1594 1606 (ceiling bits 32)))) 1595 1607 (error "can't determine representation keyword for ~s" f))))) 1608 1609 (defun foreign-record-accessor-names (record-type &optional prefix) 1610 (collect ((accessors)) 1611 (dolist (field (foreign-record-type-fields record-type) (accessors)) 1612 (let* ((field-name (append prefix (list (foreign-record-field-name field)))) 1613 (field-type (foreign-record-field-type field))) 1614 (if (typep field-type 'foreign-record-type) 1615 (dolist (s (foreign-record-accessor-names field-type field-name)) 1616 (accessors s)) 1617 (accessors field-name)))))) 1596 1618
Note:
See TracChangeset
for help on using the changeset viewer.
