Changeset 10493


Ignore:
Timestamp:
Aug 19, 2008, 10:20:19 AM (11 years ago)
Author:
gb
Message:

Pass small (<= 32 bits) structures by value.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lib/ffi-darwinx8632.lisp

    r10125 r10493  
    6666                (argforms arg-type-spec)
    6767                (argforms arg-value-form))
    68               (let* ((ftype (parse-foreign-type arg-type-spec)))
    69                 (argforms (foreign-type-to-representation-type ftype))
     68              (let* ((ftype (parse-foreign-type arg-type-spec))
     69                     (bits (ensure-foreign-type-bits ftype)))
     70                (if (and (typep ftype 'foreign-record-type)
     71                         (<= bits 32))
     72                  (argforms (ceiling bits 32))
     73                  (argforms (foreign-type-to-representation-type ftype)))
    7074                (argforms (funcall arg-coerce arg-type-spec arg-value-form))))))
    7175          (argforms (foreign-type-to-representation-type result-type))
Note: See TracChangeset for help on using the changeset viewer.