public void Push(GLua GLua, object obj) { if (obj is string str) { IntPtr ptr = InteropHelp.EncodeUTF8String(str, out var handle); try { GLua.LuaBase.PushString(ptr /*, Convert.ToUInt32(Encoding.UTF8.GetByteCount(str))*/); } finally { InteropHelp.FreeString(ref handle); } } }