lua-users home
lua-l archive

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


I've been writing C function that needs access to Lua global variable.
I use 
 lua_getglobal(L, "session");
but it returns `nil'.

But I *have* global `session' var. I even done setglobal("session", session)!

Execution goes as this

main.cpp:
register(c-func)
dofile(main.lua)

main.lua:
session={...}
call c-func

-- 
Trap full -- please empty.