> Is there any way to determine if a function reference stored on the > stack points to a Lua or a C function? There is a C API to do this, see section 5.4 of the manual. (lua_iscfunction) Why do you want to do this, anyway?