| 56 | |
| 57 | namespace { |
| 58 | detail::function_object* get_function_object(argument const& fn) { |
| 59 | lua_State * L = fn.interpreter(); |
| 60 | { |
| 61 | fn.push(L); |
| 62 | detail::stack_pop pop(L, 1); |
| 63 | if (!detail::is_luabind_function(L, -1)) { |
| 64 | return NULL; |
| 65 | } |
| 66 | } |
| 67 | return *touserdata<detail::function_object*>(getupvalue(fn, 1)); |
| 68 | } |
| 69 | |
| 70 | std::string get_function_name(argument const& fn) { |
| 71 | detail::function_object * f = get_function_object(fn); |
no test coverage detected