[cffi-devel] defcstruct bz_stream

James Bielman jamesjb at jamesjb.com
Tue Jan 17 19:31:39 UTC 2006


Brad Anderson <brad at sankaty.com> writes:

> Kilian Sprotte wrote:
>>
>> (defcstruct bz_stream
>> 	(next_in :char)
>> 	(avail_in :unsigned-int)
>> 	(total_in_lo32 :unsigned-int)
>> 	(total_in_hi32 :unsigned-int)
>> 	(next_out :char)
>> 	(avail_out :unsigned-int)
>> 	(total_out_lo32 :unsigned-int)
>> 	(total_out_hi32 :unsigned-int)
>> 	(state :void)
>> 	(bzalloc :void)
>> 	(bzfree :void)
>> 	(opaque :void))
>> 
>
> I'm not sure if my error was division-by-zero, but in libxml2, which
> I used SWIG/CFFI to bind, the :void types were actually void*, and
> so I switched all of them to :pointer.

Yes, use :POINTER for these.  The fact that CFFI even accepts :VOID
here is a bug---I'll look into this.

James



More information about the cffi-devel mailing list