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

Function GetCppInstanceFast

Plugins/UnLua/Source/UnLua/Private/LuaCore.cpp:469–478  ·  view source on GitHub ↗

* Get a cpp instance's address, fast path */

Source from the content-addressed store, hash-verified

467 * Get a cpp instance's address, fast path
468 */
469void* GetCppInstanceFast(lua_State *L, int32 Index)
470{
471 bool bTwoLvlPtr = false;
472 void *Userdata = GetUserdataFast(L, Index, &bTwoLvlPtr);
473 if (Userdata)
474 {
475 return bTwoLvlPtr ? *((void**)Userdata) : Userdata; // return instance's address
476 }
477 return nullptr;
478}
479
480
481/**

Callers 15

ScriptStruct_IndexFunction · 0.85
ScriptStruct_CopyFromFunction · 0.85
ScriptStruct_CopyFunction · 0.85
ScriptStruct_CompareFunction · 0.85
GetMulticastDelegateInfoFunction · 0.85
ClearMethod · 0.85
BroadcastMethod · 0.85
IsBoundMethod · 0.85
TArray_PairsFunction · 0.85
TArray_LengthFunction · 0.85
TArray_AddFunction · 0.85
TArray_AddUniqueFunction · 0.85

Calls 1

GetUserdataFastFunction · 0.85

Tested by

no test coverage detected