(RealStatePtr L, int idx, object target)
| 406 | } |
| 407 | |
| 408 | private object getLuaFunction(RealStatePtr L, int idx, object target) |
| 409 | { |
| 410 | if (LuaAPI.lua_type(L, idx) == LuaTypes.LUA_TUSERDATA) |
| 411 | { |
| 412 | object obj = translator.SafeGetCSObj(L, idx); |
| 413 | return (obj != null && obj is LuaFunction) ? obj : null; |
| 414 | } |
| 415 | if (!LuaAPI.lua_isfunction(L, idx)) |
| 416 | { |
| 417 | return null; |
| 418 | } |
| 419 | LuaAPI.lua_pushvalue(L, idx); |
| 420 | return new LuaFunction(LuaAPI.luaL_ref(L), translator.luaEnv); |
| 421 | } |
| 422 | |
| 423 | public void AddCaster(Type type, ObjectCast oc) |
| 424 | { |
nothing calls this directly
no test coverage detected