public static int ReadInt16(IntPtr ptr) { try { ByteArray self = (ByteArray)LuaObject.CheckSelf(ptr); short ret = self.ReadShortInt(); LuaObject.PushValue(ptr, true); LuaObject.PushValue(ptr, ret); return(2); } catch (Exception e) { return(Error(ptr, e)); } }