MCPcopy Create free account
hub / github.com/Tencent/xLua / ToString

Function ToString

Assets/XLua/Src/StaticLuaCallbacks.cs:180–194  ·  view source on GitHub ↗
(RealStatePtr L)

Source from the content-addressed store, hash-verified

178 }
179
180 [MonoPInvokeCallback(typeof(LuaCSFunction))]
181 public static int ToString(RealStatePtr L)
182 {
183 try
184 {
185 ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
186 object obj = translator.FastGetCSObj(L, 1);
187 translator.PushAny(L, obj != null ? (obj.ToString() + ": " + obj.GetHashCode()) : "<invalid c# object>");
188 return 1;
189 }
190 catch (Exception e)
191 {
192 return LuaAPI.luaL_error(L, "c# exception in ToString:" + e);
193 }
194 }
195
196#if GEN_CODE_MINIMIZE
197 public static int DelegateCombine(RealStatePtr L, int top)

Callers

nothing calls this directly

Calls 6

FindMethod · 0.80
FastGetCSObjMethod · 0.80
PushAnyMethod · 0.80
luaL_errorMethod · 0.80
ToStringMethod · 0.45
GetHashCodeMethod · 0.45

Tested by

no test coverage detected