Re: bitfields in structs

Kevin Rosenberg <kevin-HJRc7zDS/[email protected]> Tue, 4 May 2004 15:54:12 -0600
Newsgroups gmane.lisp.uffi.general
Message-ID <[email protected]>
rif wrote:
> I assume there's no direct way to wrap this in UFFI?  In fact, can
> this even be done on top of most UFFI's?  Fortunately, I don't *think*
> I need to actually access any of the fields in this thing --- I think
> I can get by with just having the sxpinfo_struct contained an
> :unsigned-int, and I guess if I need bit access I could write
> accessors in C or something?

UFFI does not have any support for bit fields. As for other FFI's, you
can read their individual documentation to check. I don't know without
me doing similar research.

As for bit access, you could either use a C wrapper or treat the bit
fields as an conglomerated integer of some width and then twidlle the
bits with CL's myriad of bit accessors.

-- 
Kevin Rosenberg
kevin-HJRc7zDS/[email protected]