MCPcopy Create free account
hub / github.com/defold/defold / GetMetaFunction

Function GetMetaFunction

engine/script/src/script.cpp:860–873  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);

Callers 5

ResolvePathFunction · 0.85
IsValidInstanceFunction · 0.85
GetInstanceContextTableFunction · 0.85
CreateCallbackFunction · 0.85
IsCallbackInstanceValidFunction · 0.85

Calls 4

lua_getmetatableFunction · 0.85
lua_pushlstringFunction · 0.85
lua_rawgetFunction · 0.85
lua_removeFunction · 0.85

Tested by

no test coverage detected