[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua_pushstring during script parsing
- From: "Andreas Falkenhahn" <andreas@...>
- Date: Sun, 05 Jun 2005 11:46:45 +0200
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.
Greets
Andreas
--
"Remember: It's nice to be important but it's more important to be nice!"