mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-12 20:31:55 -08:00
Fix foreign function return type handling when it is specified with a user-defined foreign type that
is and alias for a foreign primitive type.
This commit is contained in:
parent
5b18148e13
commit
db73b0fdc8
2 changed files with 9 additions and 3 deletions
|
|
@ -19,6 +19,12 @@ ECL 0.9h
|
|||
initialization files; errors during initialization are intercepted and cause
|
||||
ECL to abort.
|
||||
|
||||
* Foreign function interface (FFI):
|
||||
|
||||
- Foreign function return type is now correctly handled, when it is specified
|
||||
with a user-defined foreign type that is an alias for a primitive type
|
||||
(M. Goffioul)
|
||||
|
||||
;;; Local Variables: ***
|
||||
;;; mode:text ***
|
||||
;;; fill-column:79 ***
|
||||
|
|
|
|||
|
|
@ -516,10 +516,10 @@
|
|||
(return-type (%convert-to-return-type returning))
|
||||
(nargs (length arguments))
|
||||
(c-string (produce-function-call c-name nargs))
|
||||
(casting-required (not (or (member returning '(:void :cstring))
|
||||
(foreign-elt-type-p returning))))
|
||||
(casting-required (not (or (member return-type '(:void :cstring))
|
||||
(foreign-elt-type-p return-type))))
|
||||
(inline-form `(c-inline ,arguments ,arg-types
|
||||
,(if casting-required :pointer-void returning)
|
||||
,(if casting-required :pointer-void return-type)
|
||||
,c-string
|
||||
:one-liner t
|
||||
:side-effects t)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue