MCPcopy Create free account
hub / github.com/Tencent/UnLua / GetLoadedModule

Function GetLoadedModule

Plugins/UnLua/Source/UnLua/Public/LowLevel.cpp:123–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121 }
122
123 int GetLoadedModule(lua_State* L, const char* ModuleName)
124 {
125 if (!ModuleName)
126 {
127 UE_LOG(LogUnLua, Warning, TEXT("%s, Invalid module name!"), ANSI_TO_TCHAR(__FUNCTION__));
128 return LUA_TNIL;
129 }
130
131 lua_getglobal(L, "package");
132 lua_getfield(L, -1, "loaded");
133 int32 Type = lua_getfield(L, -1, ModuleName);
134 lua_remove(L, -2);
135 lua_remove(L, -2);
136 return Type;
137 }
138
139 bool CheckPropertyOwner(lua_State* L, ITypeOps* InProperty, void* InContainerPtr)
140 {

Callers 1

BindClassMethod · 0.85

Calls 2

lua_getglobalFunction · 0.85
lua_getfieldFunction · 0.85

Tested by

no test coverage detected