[cffi-devel] Interesting problem passing faux pointers

Luis Oliveira luismbo at gmail.com
Tue Sep 20 00:53:11 UTC 2005


On 19/set/2005, at 18:15, Kenny Tilton wrote:
> Is this oddity something that is not covered by the test suite? Or did 
> I miss some new CFFI make-pointer? The CFFI reference chapter on 
> pointers is a little sparse. :)

You can generate a pointer to a given address by using:

   (inc-ptr (null-ptr) <address>)

Which is a bit silly. I guess I'll add a new CFFI-SYS primitive:

   MAKE-PTR address

And well, why not, PTR-ADDRESS to get the address of the pointer.

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




More information about the cffi-devel mailing list