Changeset 5760
- Timestamp:
- Jan 20, 2007, 11:05:54 PM (18 years ago)
- Location:
- trunk/ccl/lib
- Files:
-
- 2 edited
-
ffi-linuxppc32.lisp (modified) (3 diffs)
-
ffi-linuxppc64.lisp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/lib/ffi-linuxppc32.lisp
r5754 r5760 37 37 38 38 39 (defun linux32::expand-ff-call (callform args )39 (defun linux32::expand-ff-call (callform args &key (arg-coerce #'null-coerce-foreign-arg) (result-coerce #'null-coerce-foreign-result)) 40 40 (let* ((result-type-spec (or (car (last args)) :void)) 41 41 (enclosing-form nil) … … 62 62 (unless (evenp (length args)) 63 63 (error "~s should be an even-length list of alternating foreign types and values" args)) 64 (do* ((args args (cddr args)))64 (do* ((args args (cddr args))) 65 65 ((null args)) 66 66 (let* ((arg-type-spec (car args)) … … 79 79 (progn 80 80 (argforms (foreign-type-to-representation-type ftype)) 81 (argforms arg-value-form)))))))81 (argforms (funcall arg-coerce arg-type-spec arg-value-form)))))))) 82 82 (argforms (foreign-type-to-representation-type result-type)) 83 (let* ((call `(,@callform ,@(argforms))))83 (let* ((call (funcall result-coerce result-type-spec `(,@callform ,@(argforms))))) 84 84 (if enclosing-form 85 85 `(,@enclosing-form ,call) -
trunk/ccl/lib/ffi-linuxppc64.lisp
r5756 r5760 36 36 (typep ftype 'foreign-record-type)))) 37 37 38 (defun linux64::expand-ff-call (callform args )38 (defun linux64::expand-ff-call (callform args &key (arg-coerce #'null-coerce-foreign-arg) (result-coerce #'null-coerce-foreign-result)) 39 39 (let* ((result-type-spec (or (car (last args)) :void))) 40 40 (multiple-value-bind (result-type error) … … 75 75 (progn 76 76 (argforms (foreign-type-to-representation-type ftype)) 77 (argforms arg-value-form)))))))77 (argforms (funcall arg-coerce arg-type-spec arg-value-form)))))))) 78 78 (argforms (foreign-type-to-representation-type result-type)) 79 `(,@callform ,@(argforms))))))79 (funcall result-coerce result-type-spec `(,@callform ,@(argforms)))))))
Note:
See TracChangeset
for help on using the changeset viewer.
