source: branches/qres/ccl/lib/ffi-win32.lisp @ 14259

Last change on this file since 14259 was 13070, checked in by gz, 10 years ago

r13066, r13067 from trunk: copyrights etc

File size: 1.7 KB
Line 
1;;; Copyright 2009 Clozure Associates
2;;; This file is part of Clozure CL. 
3;;;
4;;; Clozure CL is licensed under the terms of the Lisp Lesser GNU
5;;; Public License , known as the LLGPL and distributed with Clozure
6;;; CL as the file "LICENSE".  The LLGPL consists of a preamble and
7;;; the LGPL, which is distributed with Clozure CL as the file "LGPL".
8;;; Where these conflict, the preamble takes precedence.
9;;;
10;;; Clozure CL is referenced in the preamble as the "LIBRARY."
11;;;
12;;; The LLGPL is also available online at
13;;; http://opensource.franz.com/preamble.html
14
15(in-package "CCL")
16
17;;; Cygwin compiler returns small structures in registers
18;;; (just like on Darwin, apparently).
19(defun win32::record-type-returns-structure-as-first-arg (rtype)
20  (when (and rtype
21             (not (typep rtype 'unsigned-byte))
22             (not (member rtype *foreign-representation-type-keywords*
23                          :test #'eq)))
24    (let* ((ftype (if (typep rtype 'foreign-type)
25                    rtype
26                    (parse-foreign-type rtype)))
27           (nbits (ensure-foreign-type-bits ftype)))
28      (not (member nbits '(8 16 32 64))))))
29
30(defun win32::expand-ff-call (callform args &key (arg-coerce #'null-coerce-foreign-arg) (result-coerce #'null-coerce-foreign-result))
31  (x8632::expand-ff-call callform args :arg-coerce arg-coerce :result-coerce result-coerce))
32
33(defun win32::generate-callback-bindings (stack-ptr fp-args-ptr argvars argspecs result-spec struct-result-name)
34  (x8632::generate-callback-bindings stack-ptr fp-args-ptr argvars argspecs result-spec struct-result-name))
35
36(defun win32::generate-callback-return-value (stack-ptr fp-args-ptr result return-type struct-return-arg)
37  (x8632::generate-callback-return-value stack-ptr fp-args-ptr result return-type struct-return-arg))
38
Note: See TracBrowser for help on using the repository browser.