lua-users home
lua-l archive

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

On 04.06.2005 at 21:32 Andreas Falkenhahn wrote:

>What do you think of the idea to use some special versions of
>lua_pushstring() and lua_newtable() which do not invoke the
>gc? I mean, I do not need the garbage collector when storing data
>in the registry because the data there should stay valid over the
>lua state's lifetime anyway. There's nothing to be collected there.

To answer my own question, just in case someone has a
similar problem: It seems to work fine with separate versions
of lua_pushstring() and lua_newtable() which do not call lua_checkGC().
I only had to create separate versions for these two functions
because all the other functions like lua_pushnumber() or lua_pushlightuserdata()
do not call lua_checkGC() anyway.

IMHO this is a good solution, if one needs to use those functions
in the parser. 


"Remember: It's nice to be important but it's more important to be nice!"