lua-users home
lua-l archive

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


I have some Lua variables that I want to access by name from both Lua
and C, and especially a lot from C. Is there any way to avoid the string
hash every time I do something like lua_pushstring/lua_gettable?
Thinking about it a bit more while typing this, it occurs to me that
maybe lua_ref/lua_getref on the strings of the variable names is the way
to go? Is lua_getref going to be significantly better than
lua_pushstring? Is there some other better way?

Thanks,

Curt