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