[cffi-devel] Validate auto-generated wrappers

Luís Oliveira luismbo at gmail.com
Wed Dec 14 11:25:01 UTC 2005


On 2005-dec-14, at 09:49, Surendra Singhi wrote:
> Hi,
>   I wrote a quick swig hack to parse c files and generate cffi  
> headers. I will
> appreciate if you can verify them, and suggest me how can I improve  
> the
> auto-generated headers, or if you can give me some test cases.

I suppose that verrazano's tests would be a good challenge.


> The C input file:

Hmm... the file seems incomplete.

[...]
> (def-c-var ("my_struct" my_struct)
>     :pointer)

def-c-var -> defcvar


> (defcfun ("pointer_func" pointer_func)	 :int
>   (ClosureFun :pointer)
>   (y :int))

If you omit the lisp name, CFFI will make the C name slightly more  
lispy. In this case, (defcfun "pointer_func" ...) would generate the  
lisp function POINTER-FUNC.

-- 
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