pitrou commented on a change in pull request #12182: URL: https://github.com/apache/arrow/pull/12182#discussion_r787579723
########## File path: python/pyarrow/io.pxi ########## @@ -1056,10 +1056,10 @@ cdef class Buffer(_Weakrefable): raise IndexError('Offset must be non-negative') if length is None: - result = SliceBuffer(self.buffer, offset) + result = GetResultValue(SliceBufferSafe(self.buffer, offset)) else: - result = SliceBuffer(self.buffer, offset, max(length, 0)) - + result = GetResultValue(SliceBufferSafe(self.buffer, offset, + max(length, 0))) Review comment: Right, it would probably be a good idea to change this. I'll give it a try. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org