lua-users home
lua-l archive

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

Ah! Thanks Peter, missed that somehow!

-----Original Message-----
[] On Behalf Of Peter Cawley
Sent: 18 November 2009 17:52
To: Lua list
Subject: Re: API to access the Allocator UserData?

On Wed, Nov 18, 2009 at 5:40 PM, John Hind <> wrote:
> However, while this is passed back to the memory
> allocator function, there is no API to recover it from the lua_State.

lua_Alloc lua_getallocf (lua_State *L, void **ud);

Returns the memory-allocation function of a given state. If ud is not
NULL, Lua stores in *ud the opaque pointer passed to lua_newstate.