| 689 | } |
| 690 | |
| 691 | bool CScriptEngine::object(const char* identifier, int type) |
| 692 | { |
| 693 | #ifdef DEBUG |
| 694 | int start = lua_gettop(lua()); |
| 695 | #endif |
| 696 | lua_pushnil(lua()); |
| 697 | while (lua_next(lua(), -2)) |
| 698 | { |
| 699 | if (lua_type(lua(), -1) == type && !xr_strcmp(identifier, lua_tostring(lua(), -2))) |
| 700 | { |
| 701 | VERIFY(lua_gettop(lua()) >= 3); |
| 702 | lua_pop(lua(), 3); |
| 703 | VERIFY(lua_gettop(lua()) == start - 1); |
| 704 | return true; |
| 705 | } |
| 706 | lua_pop(lua(), 1); |
| 707 | } |
| 708 | VERIFY(lua_gettop(lua()) >= 1); |
| 709 | lua_pop(lua(), 1); |
| 710 | VERIFY(lua_gettop(lua()) == start - 1); |
| 711 | return false; |
| 712 | } |
| 713 | |
| 714 | bool CScriptEngine::object(const char* namespace_name, const char* identifier, int type) |
| 715 | { |
no test coverage detected