Original Post
I'm writing a program that uses Lua, and I've hit a snag. I want to pass a Lua function to a C function as a callback. Like: someCFunction(function(foo) print(foo) end) Then at some point the script calls another C function, which calls the callback passed above. However I don't see a way to retrieve functions passed as parameters in C. I can call it when it's still on the stack, but I need to retrieve it and store it to call later. Is this possible?