| 858 | } |
| 859 | |
| 860 | static bool GetMetaFunction(lua_State* L, int index, const char* meta_table_key, size_t meta_table_key_length) { |
| 861 | if (lua_getmetatable(L, index)) { |
| 862 | lua_pushlstring(L, meta_table_key, meta_table_key_length); |
| 863 | lua_rawget(L, -2); |
| 864 | lua_remove(L, -2); |
| 865 | if (lua_isnil(L, -1)) { |
| 866 | lua_pop(L, 1); |
| 867 | return false; |
| 868 | } else { |
| 869 | return true; |
| 870 | } |
| 871 | } |
| 872 | return false; |
| 873 | } |
| 874 | |
| 875 | bool ResolvePath(lua_State* L, const char* path, uint32_t path_size, dmhash_t& out_hash) { |
| 876 | DM_LUA_STACK_CHECK(L, 0); |
no test coverage detected