lua-users home
lua-l archive

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


Hi all,

After reading "Calling Lua From a C Program", I see it's need to call "priming lua_pcall()" or
"priming lua_dofilel()" before using "lua_getglobal()" to get a function and run it successfully.
Or the program will complain "attempt to call a nil value".

But after googling and going through "Programming in Lua", I can't find what is under the
hood. Could anyone can explain why need the the magical "priming lua_pcall"?

Thanks very much in advance!

Best Regards
Nan Xiao