[fetter-devel] unnamed bit fields

Rayiner Hashem rayiner at gmail.com
Tue Sep 13 03:03:05 UTC 2005


Been AFK this weekend, so sorry for the belated reply.

The first problem is a bug in the simplifier which I've fixed in my tree.
The second problem is a bug in the C-FFI backend's "C to C-FFI" type
translation table. I've added "long long int" to the type table. I'll have
to hunt down what other fundamental types GCC-XML emits that aren't
in the C or C++ standards :-/

The issue about bitfields is a bigger problem. It won't keep the library 
from
compiling, but to be able to access the bitfields, I'd have to write a 
lowering
pass that would collapse the bitfield members and generate wrapper functions
for doing the bit-twiddling to access those members. Luis, is bitfield 
support in
the cards for C-FFI, or would I be better of writing the lowering pass? 

Sincerely,
Rayiner Hashem

On 9/10/05, Andras Simon <asimon at math.bme.hu> wrote:
> 
> 
> 
> On Sat, 10 Sep 2005, Luis Oliveira wrote:
> 
> >
> > No, CFFI doesn't support bit-fields yet. But the problem there is that 
> the
> > last structure slot is nameless.
> 
> Yes, that's what the error message suggested (hence the Subject). But
> then it occurred to me that perhaps this was only the tip of the
> iceberg (ie., that there were no bit-fields at all).
> 
> 
> > I'd say you could generate bindings to PCRE
> > without that header, but I might be wrong.
> 
> Thanks for the suggestion, I'll try that. The question is whether this
> is possible without modifying system header files. And anyway, maybe
> Verrazano shouldn't output stuff that cffi doesn't understand. Another
> example is
> 
> (cffi:defcstruct lldiv-t (quot long long int) (rem long long int))
> 
> By the way, it's Verrazano/cffi that I'm interested in, not pcre.
> 
> Andras
> _______________________________________________
> fetter-devel mailing list
> fetter-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/fetter-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/fetter-devel/attachments/20050912/cd1e4dcc/attachment.html>


More information about the fetter-devel mailing list