[cffi-devel] Re: Callback Symbol Names

Luis Oliveira luismbo at gmail.com
Sun Aug 21 13:53:00 UTC 2005


On 21/ago/2005, at 09:40, James Bielman wrote:
> As it stands, I think CFFI-SYS::MAKE-CALLBACK does not safely intern
> the symbols it uses for callback names (on all the implementations but
> SBCL it seems).  For example, if you use DEFCALLBACK from the REPL,
> the callback symbol is interned into the current package; in my test
> case, it was interned into CL-USER.  Also, callbacks with the same
> symbol name but from different packages will redefine each other.

Thanks for pointing that out. (I should read Erann Gat's paper /The 
Complete Idiot's Guide to Common Lisp Packages/)


> So, I propose a separate package for callback symbols, and making sure
> we also use the package name of the symbol we are defining a callback
> for.
>
> Also, thinking back to our earlier conversation about making some sort
> of CFFI-UTILS package, I would suggest putting it first in the system
> definition so the backends can make use of it as well, then we can put
> CALLBACK-SYMBOL-NAME there as well.

Good idea, I'll put callback-symbol-name there and push cffi-utils as 
that is completely independent of the remaining stuff I'm working on.

Pushed.

Btw, there might be similar issues with DEFCFUN-HELPER-FORMS, I'll 
check that out after reading Erann Gat's guide. :-)

-- 
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/
Equipa Portuguesa do Translation Project
http://www2.iro.umontreal.ca/~pinard/po/registry.cgi?team=pt




More information about the cffi-devel mailing list