I need to call a Lua function from C and as long the function is global I can find it in the global table, but if it is declared local, how can I push the address on the stack to call it?
function MyGlobal()
print("Global")
end
local function MyLocalGlobal()
print("Local")
end
Calling MyGlobal()
from C isn't a problem it works fine. I lookup the function in the global table.
But how do I call MyLocalGlobal()
from C? It isn't in the global table, but where is it and how can I push the address?
I'm using Lua 5.3.4.