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

Method Push

Plugins/UnLua/Source/UnLua/Public/UnLuaLegacy.h:962–975  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

960 struct TGenericTypeHelper
961 {
962 static int32 Push(lua_State* L, T&& V, bool bCopy)
963 {
964 if (bCopy)
965 {
966 void* Userdata = UnLua::NewUserdata(L, sizeof(typename TDecay<T>::Type), TType<typename TDecay<T>::Type>::GetName(), alignof(typename TDecay<T>::Type));
967 if (!Userdata)
968 {
969 return 0;
970 }
971 new(Userdata) typename TDecay<T>::Type(V);
972 return 1;
973 }
974 return TPointerHelper<typename TRemoveReference<T>::Type>::Push(L, &V);
975 }
976
977 static T Get(lua_State* L, int32 Index)
978 {

Callers

nothing calls this directly

Calls 3

NewUserdataFunction · 0.85
GetNameFunction · 0.85
PushFunction · 0.70

Tested by

no test coverage detected