[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: binary data as string snag
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 06 Feb 2001 17:11:25 -0200
> However if you want to pass the strings to C to be used directly then
> there are alignment issues.
Yes; Lua gives no garanties about alignment of its strings (except that
they are valid for strings ;-).
> I started implementing Perl-style pack/unpack functions [...]
Wouldn't you have to handle alignment details anyway? For instance, if
you pack with format "cf", the floating point will not be aligned.