lua-users home
lua-l archive

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


Shmuel Zeigerman wrote:
> On 05/05/2011 21:28, Peter Cawley wrote:
> >This is not surprising, as IIRC, there is no guarantee that the
> >default allocator doesn't use the opaque UD value, and you go and
> >change the opaque UD value.
> 
> Well, I must have overlooked that. Time to fix my codes.
> 
> Then, if one still wants to use the default Lua/LuaJIT allocator and
> at the same time his own UD, what are the options?

You need to use your own function, too, which passes the original
UD to the original allocator. I.e. you'd need to save these two
items in your own struct.

> Is it guaranteed that the default allocator and/or default UD
> pointer will never change?

It won't change unless you change it yourself, as Peter already
explained.

BTW: Peter, your system date or your timezone is off by two hours.

--Mike