lua-users home
lua-l archive

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


> 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