mroeschke commented on code in PR #50409:
URL: https://github.com/apache/arrow/pull/50409#discussion_r3668248854
##########
python/pyarrow/src/arrow/python/common.h:
##########
@@ -425,10 +429,13 @@ struct PyBytesView {
RETURN_IF_PYERROR();
if (!PyBytes_Check(ref.obj())) {
return Status::TypeError("Expected uuid.UUID.bytes to return bytes, got
'",
- Py_TYPE(ref.obj())->tp_name, "' object");
+ internal::PyObject_StdStringTypeName(ref.obj()),
+ "' object");
}
- bytes = PyBytes_AS_STRING(ref.obj());
- size = PyBytes_GET_SIZE(ref.obj());
+ bytes = PyBytes_AsString(ref.obj());
+ RETURN_IF_PYERROR();
+ size = PyBytes_Size(ref.obj());
+ RETURN_IF_PYERROR();
Review Comment:
Thanks, done in c9c391006d11d7787cf97d742b35522771a63ba6
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]