[cffi-devel] question about defcfun

Stephen Compall s11 at member.fsf.org
Wed Mar 1 06:11:31 UTC 2006


On Wed, 2006-03-01 at 00:21 -0500, Hazen Babcock wrote:
> This should create a function call bar-l-foo (or maybe #|bar-l- 
> foo|?), but doesn't appear to (as judged by my not getting a function  
> prototype at the slime REPL).

The easiest way to debug macros is to expand them by putting point at
the opening paren in a Lisp mode buffer and doing C-c RET (or C-c C-m).
You can do this recursively in the resultant Macroexpansion buffer, and
(soon?) will be able to expand forms in place.

> Maybe defcfun is not getting the right kind of symbol?

You got it, the symbol you are generating is #:|bar-L-FOO| as
make-symbol doesn't intern its result, and you didn't normalize the case
of the string you gave to it anyway.  Some people like to
READ-FROM-STRING to get a reasonable symbol from a string; there are
other ways to get a reasonable symbol.

-- 
Stephen Compall
http://scompall.nocandysw.com/blog
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20060301/b29b828d/attachment.sig>


More information about the cffi-devel mailing list