[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Size of full userdata
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 16 Jun 2004 07:16:07 -0300
> I cannot find a formal method to determine the size of a full userdata
We're planning to add this to Lua 5.1.
>I have found by looking at the lua source that I can cast the
>value returned by lua_touserdata to an int pointer, subtract one from it,
>and dereference it to get the size. Is there a better way?
You can always store the size in the block itself.