[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Maximum alignment question
- From: "Alex Davies" <alex.mania@...>
- Date: Mon, 16 Feb 2009 17:53:57 +0900
Bogdan Marinescu wrote:
Thank you, I understood that. The part that I don't understand is why
does the string have to be fully aligned.
From the reference manual "lua_tolstring returns a fully aligned pointer to
a string inside the Lua state.".
I imagine the reason this is guaranteed is so that strings can contain
binary data - structs etc. Useful when looking up cached values in tables
for example, - would also allow specialised high speed string functions to
be written which both know the length of the string, and that it's aligned.