Entertainingly enough, the C and C++ ABIs differ in this regard.
C (even C99) says that sizeof(empty-struct) = 0, alignof(empty-struct) = 1 C++ says that sizeof(empty-struct) = 1, alignof(empty-struct) = 1
I say use the C layout, since Verrazano does its own layout for C++ that doesn't depend on what CFFI thinks the sizeof a type is.
Sincerely, Rayiner hashem
On 9/7/05, Luis Oliveira luismbo@gmail.com wrote:
On 7/set/2005, at 04:49, Kenny Tilton wrote:
(cffi:defcstruct alcdevice-struct)
[...]
I will let you all fight it out, but it looks as if CFFI needs to be more tolerant? I will try initializing the max-align to 2 and see how much further I get.
CFFI needs bug fixing that's what it is. :-)
Well, I can't find anything specific about empty structures in the ABI docs so I'm going to assume an empty struct indeed has size 0 and alignment 1 (or 0, whatever).
I'll add a test for this too.
-- 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
cffi-devel mailing list cffi-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel