[cffi-devel] more flexible name translation

Greg Pfeil greg at technomadic.org
Fri Sep 3 01:03:24 UTC 2010


Here's a patch that makes name translation between lisp and foreign names more flexible. I often find that I'm using libraries that don't use underscore_separated_names, and rather than always doing

	(defcfun (some-fun "someFun") ...)

I end up doing local hacks so I can just define the translation rules once and only use the (symbol "string") style for exceptions.

This patch makes those local hacks less hacky. It means in my wrapper, I can define methods on CFFI:LISP-NAME and CFFI:FOREIGN-NAME (as in http://github.com/sellout/CL-LLVM/blob/master/cffi.lisp) to create custom translations (specialized on the package, so other wrappers can use their own translations).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: name-translation.patch
Type: application/octet-stream
Size: 6080 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20100902/4921d7a0/attachment.obj>


More information about the cffi-devel mailing list