|
Hi Sven, Am 10.12.2012 um 22:48 schrieb Sven Olsen:
I'm interested in the C stack only, because for debugging passing / returning arguments from / to the Lua functions. So I push via C API the Lua function to the C stack and run lua_call, but on some debug runs I will create a output of the C stack before the lua_call is run, so my stack shows eg 4 number 123 3 string "test" 2 boolean "true" 1 lua function and on the item 1 it would read the name of the function. In my case the Lua function and the arguments of the function are pushed by the routines on program top, so in the cases there are different Lua function. If I iterate on a stack (eg above), I would get only the function name back. I can determine that a stack item is a lua function (or a C function) but can I get a reference of the name of the function? I push it also with a name to the stack, so somewhere must be stored that the item n is a lua function with a name or is the stack item of a lua function a pointer to the a memory block? Thanks Phil |