Is there a way to find out through the Lua C API if a function value is a Lua or a C closure?
The first thing that came to my mind was the lua_type
function but apparently it can only can tell if something is a function.
The reason I am asking I'm currently working on some very evil hacky code and would like to be able to at least give a graceful error if the value is a C closure.
LClosure *cl = (void *) lua_topointer(L, 1);