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.