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

Function TestScriptExtensionFinalize

engine/script/src/test/test_script_lua.cpp:906–917  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

904}
905
906static void TestScriptExtensionFinalize(dmScript::HContext context)
907{
908 lua_State* L = dmScript::GetLuaState(context);
909 DM_LUA_STACK_CHECK(L, 0);
910
911 TestScriptExtension* extension = GetTestScriptExtension(context);
912 ++extension->m_FinalizedCalled = 1;
913 lua_pushinteger(L, (lua_Integer)dmHashBuffer32("__TestScriptExtension__", strlen("__TestScriptExtension__")));
914 lua_pushnil(L);
915 dmScript::SetContextValue(context);
916 dmScript::Unref(L, LUA_REGISTRYINDEX, extension->m_SelfRef);
917}
918
919struct TestScriptWorldContext
920{

Callers

nothing calls this directly

Calls 7

GetTestScriptExtensionFunction · 0.85
lua_pushintegerFunction · 0.85
lua_pushnilFunction · 0.85
SetContextValueFunction · 0.85
UnrefFunction · 0.85
GetLuaStateFunction · 0.50
dmHashBuffer32Function · 0.50

Tested by

no test coverage detected