On 19-Jan-07, at 10:29 PM, Raymond Jacobs wrote:
> This is now slightly off-topic, but
>
> I don't suppose there is a way to identify 'system' tables, such as
> os,_G,math, and etc.?
Nope. There's no such thing as a system table, really: the Lua core
doesn't define any; they're all inserted by the embedding application.
If you're trying to maintain some sort of additional environment, I'd
suggest you use an environment table; you can give it {__index = _G} as
a metatable which will make the initial globals table the fallback.
lua_next ignores metatables, so it will only iterate over keys that are
actually in the table you're iterating.