[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Best practices for lua_Reader?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Sun, 10 Jun 2012 09:40:06 -0300
> But it seems to me that it's not wise to keep the state in a static
> variable, so I was thinking of tying it to my lua_State as C user data.
> Is that the way to go or are there more appropriate methods?
You can use an automatic variable (a "local" in C) in the function