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

Function ResolvePath

engine/script/src/script.cpp:875–888  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);
877 GetInstance(L);
878 if (GetMetaFunction(L, -1, META_TABLE_RESOLVE_PATH, sizeof(META_TABLE_RESOLVE_PATH) - 1)) {
879 lua_pushvalue(L, -2);
880 lua_pushlstring(L, path, path_size);
881 lua_call(L, 2, 1);
882 out_hash = CheckHash(L, -1);
883 lua_pop(L, 2);
884 return true;
885 }
886 lua_pop(L, 1);
887 return false;
888 }
889
890 bool GetURL(lua_State* L, dmMessage::URL& out_url)
891 {

Callers 2

URL_newFunction · 0.85
ResolveURLFunction · 0.85

Calls 6

GetMetaFunctionFunction · 0.85
lua_pushvalueFunction · 0.85
lua_pushlstringFunction · 0.85
lua_callFunction · 0.85
CheckHashFunction · 0.85
GetInstanceFunction · 0.70

Tested by

no test coverage detected