[cffi-devel] cffi-libffi funcall path and :string

Liam Healy lnp at healy.washington.dc.us
Sat May 26 22:15:52 UTC 2012


Please pull and check
 Head:       399f51a896 - New method #'translate-into-foreign-memory for
foreign-string-type

Liam


On Fri, May 18, 2012 at 1:19 PM, Ryan Pavlik <rpavlik at gmail.com> wrote:

> For functions using the libffi foreign-funcall path, functions defined
> with :string parameters still fail because
> TRANSLATE-INTO-FOREIGN-MEMORY is not defined on
> FOREIGN-STRING-TYPE.  E.g.,
>
> (defcfun ("xcb_intern_atom" xcb-intern-atom) (:struct
> xcb-intern-atom-cookie-t)
>  (c :pointer)
>  (only_if_exists :unsigned-char)
>  (name_len :unsigned-short)
>  (name :string))
>
> Calling this fails:
>
> There is no applicable method for the generic function
>  #<STANDARD-GENERIC-FUNCTION TRANSLATE-INTO-FOREIGN-MEMORY (5)>
> when called with arguments
>  (#.(SB-SYS:INT-SAP #X7FFFD8000DC0)
>   #<CFFI::FOREIGN-STRING-TYPE :UTF-8>
>   #.(SB-SYS:INT-SAP #X7FFFECDB7FD8)).
>   [Condition of type SIMPLE-ERROR]
>
> This is using unmodified master.
>
> --
> Ryan Pavlik <rpavlik at gmail.com>
> 425.220.9585
>
> _______________________________________________
> cffi-devel mailing list
> cffi-devel at common-lisp.net
> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20120526/14703445/attachment.html>


More information about the cffi-devel mailing list