Re: Best practices for lua_Reader?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Best practices for lua_Reader?
- From: Roberto Ierusalimschy <roberto@...>
- Date: 2012年6月10日 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
calling lua_load.
-- Roberto