lua-users home
lua-l archive

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


Hi

I have a C-side code that keeps references to Lua values in the registry. Now I need to change the value. Is it acceptable to directly substitute the value in the registry table like this:

lua_rawseti(L,LUA_REGISTRYINDEX,myref);


If not, I have to do something like:

lua_unref(L,myref);
myref=lua_ref(L,TRUE);

which will probably produce a different reference index. I have the index stored in multiple places, so updating all of them to the new index can be a pain.

Thanks
Ivo