lua-users home
lua-l archive

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


The lua demo is cool! I'll not do it in C.

I think this mail should be in plain ascii, thanks for the reminder.


On 02/12/06, Rici Lake <> wrote:
1) Actually, lua_getglobal does not do . resolution.

2) However, there is an undocumented interface in lauxlib,
luaL_findtable(). This doesn't actually do what you want either, but it
shows how you might write such a function in c.

In Lua, it's pretty easy:

function getdotted(field, start)
   start = start or _G
   for k in field:gmatch"[^.]+" do
     start = start[k]
     if start == nil then break end
   return start

3) Please figure out how to turn off HTML mail for list submissions

4) Sorry for top-posting