lua-users home
lua-l archive

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


>> with a suitable definition of LUA_USERSTATE

like this:

typedef struct
{
	mydata...
} LUA_USERSTATE;

And you can also define lua_userstateopen(lua_State *L) that Lua will call
just after allocating the space.


-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br]On Behalf Of Dirk Zoller
Sent: Wednesday, December 17, 2003 7:21 AM
To: Lua list
Subject: Re: realloc lua_State

Luiz Henrique de Figueiredo wrote:
>>Is it safe to realloc a lua_State just after a call to lua_open?
>
>
> Why would you want to do this?
> --lhf

In order to be able to add application specific data to it?