[cffi-devel] ECL specific changes for CFFI

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Sun Apr 25 12:47:58 UTC 2010


* The former definition for :long-long types in cffi-ecl.lisp was broken. I
have agumented ECL with a feature that signals the existence of such a type
in ECL and include a patch here for CFFI to take that into account. (Patch
attached)

* Instead of defining NULL-POINTER-P, it would be better to simply reexport
the symbol living in the "EXT" package. Patch attached.

* Upon reading the CFFI specification it seems that FOREIGN-FREE can only
free memory that has been allocated by CFFI. However the test cases in
misc-types.lsp do something else, deallocating the output of my_strdup()
explicitely.

* At the low level ECL has two different foreign function interfaces: one
used in the interpreter and relying on an external library (libffi) and
another one, much simpler, using the C compiler. Right now CFFI was only
using the former unless it was not available. I provide a patch that chooses
the interface depending on the use of the code: interpreter or compiled.
(patch attached).

* Is there the equivalent of launchpad for CFFI? Should I always submit the
patches to the mailing list? I say this because there are other improvements
I could forward when I find time.

Cheers

Juanjo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://tream.dreamhosters.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20100425/80e8da99/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Proper-support-of-the-long-long-type.patch
Type: application/octet-stream
Size: 1095 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20100425/80e8da99/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Do-not-dealloc-with-FOREIGN-FREE-the-strings-returne.patch
Type: application/octet-stream
Size: 1686 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20100425/80e8da99/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Instead-of-defining-a-new-null-pointer-p-just-reexpo.patch
Type: application/octet-stream
Size: 1112 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20100425/80e8da99/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Teach-CFFI-to-use-C-INLINE-when-producing-compiled-c.patch
Type: application/octet-stream
Size: 3762 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20100425/80e8da99/attachment-0003.obj>


More information about the cffi-devel mailing list