lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Thu, Oct 14, 2010 at 4:45 PM, Cosmin Apreutesei
<> wrote:
>> It is very outdated, sorry... I implemented the improved support for C
>> structures and completely forgot about continue to track Roberto's
>> struct implementation for those that want something simpler.
> I found out each technique for (un)packing structs has its own merits,
> and I'm using them all, so please continue to support the struct part.
> I will be testing alien on 64bit linux soon and see how it turns out.
> Thanks again for your efforts Fabio.

I think I understand why the sizes were hardcoded: this, plus the
endian flags, allows you to pack bytes in one architecture and unpack
them in another with the same format string (so you can send the
packed information via the network, for example). You can still do
that in the new struct.c using the i<n> format code, though, and this
is probably why Roberto changed h/H and l/L to use the native sizes.

Fabio Mascarenhas