lua-users home
lua-l archive

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


Hell All,

    I'm using this code to get and store the global table from a state:

    lua_pushvalue(l, LUA_GLOBALSINDEX);
    lua_pushstring(l,"mynamespace_globaltable");
    lua_settable(l,LUA_REGISTRYINDEX);

    But, can I use another form that don't use the registry to store the
table? This is because I can't set in the global table or its children, and
I don't want to store in the registry table. Someone has a suggestion?
    Another question: can I replace the global table with a userdata with
metatable? Or lua checks if global table is a real table?

                                                                    The
God's Peace,


Leandro.