[cffi-devel] OpenAL or Bust
Rayiner Hashem
rayiner at gmail.com
Wed Sep 7 05:13:24 UTC 2005
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 at 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 at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20050907/4b1057bd/attachment.html>
More information about the cffi-devel
mailing list