[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: initialization of userdata
- From: Peter Cawley <lua@...>
- Date: Fri, 16 Dec 2011 17:26:39 +0000
On Fri, Dec 16, 2011 at 4:42 PM, Dirk Laurie <email@example.com> wrote:
> The manual says of `luanewuserdata`:
> …allocates a new block of memory with the given size, pushes onto the
> stack a new full userdata with the block address, and returns this
> It does not say the block is initialized to zero, but that invariably
> has so far been true on my system.
> Implementation detail?
>From a quick browse of the Lua source , it would seem that the
initial contents is whatever your memory allocation routine puts into
newly allocated blocks.
: The call chain is: