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