[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Cannot call Lua function from C code
- From: Sudhindra Murthy <murthy.sudhi@...>
- Date: Wed, 6 Jan 2010 21:03:42 +0530
I have a chunk of C code that is loading the Lua bytecode (generated using luac). The C code invokes a Lua function. But the Lua VM is not able to find the function.
Used the luac to generate the listing to check if the symbol (function) is present in the bytecode and it sure was.
Anyone has an idea? Call flow in C code as below
// Open Lua standard libraries - basic, table, string , etc
// Load App SDK - push C functions
luaL_loadbuffer -- to load bytecode
All the above calls are successful.
lua_isfunction(luaState,-1) ---> THIS IS FAILING
Please let me know for additional info.