lua-users home
lua-l archive

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]


> 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 :-)

AltStyle によって変換されたページ (->オリジナル) /