| 27 | namespace luabind { namespace detail |
| 28 | { |
| 29 | int pcall(lua_State *L, int nargs, int nresults) |
| 30 | { |
| 31 | pcall_callback_fun e = get_pcall_callback(); |
| 32 | int en = 0; |
| 33 | if ( e ) |
| 34 | { |
| 35 | int base = lua_gettop(L) - nargs; |
| 36 | lua_pushcfunction(L, e); |
| 37 | lua_insert(L, base); // push pcall_callback under chunk and args |
| 38 | en = base; |
| 39 | } |
| 40 | int result = lua_pcall(L, nargs, nresults, en); |
| 41 | if ( en ) |
| 42 | lua_remove(L, en); // remove pcall_callback |
| 43 | return result; |
| 44 | } |
| 45 | |
| 46 | int resume_impl(lua_State *L, int nargs, int) |
| 47 | { |
no test coverage detected