Re: How to avoid global variables in a lua module (using C api)
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: How to avoid global variables in a lua module (using C api)
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: 2011年9月30日 18:32:31 -0300
> Besides, I would like to know: is there any difference
> in declaring C static variables vs. using the Lua registry?
Yes. Your library should work for any number of independent Lua states.
If the static data varies per state, then it cannot be static :-)