RFC: INLINE defcfun and auto FTYPE declarations [with patch]

Andrzej Walczak andrzejwalczak at google.com
Wed Nov 1 22:43:36 UTC 2017


Dear CFFI developers!

Recently we have migrated one of our largest projects from our home-grown
foreign-function interface implementation to CFFI.
The project is almost 1M LOC with almost 1K of foreign-functions.

Previously, we have inlined all of our foreign-function stubs. We also use
FTYPEs through the code for type-safety and optimization.
Having CFFI functions inlined and FTYPEs generated would spare us from
writing those declarations on our own.

The attached patch contains a proposal that we would like to share.
Please, let us know about any modification necessary that would make this
patch useful for a larger community.

FYI: We have tested the patch against about a hundredth open-source Lisp
projects.

Kindly,

-- 
Andrzej Walczak
(Google/ITA Software Engineer)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20171101/909a443b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 006-defcfun-ftype.patch
Type: text/x-patch
Size: 7909 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20171101/909a443b/attachment.bin>


More information about the cffi-devel mailing list