mirror of
https://github.com/apache/arrow.git
synced 2026-10-29 17:15:39 +08:00
fix
This commit is contained in:
1 parent
8e8e90114a
commit
caf8516532
1 file changed
+5
@@ -325,10 +325,15 @@ Status CallCustomCallback(PyObject* context, PyObject* method_name, PyObject* el
|
||||
std::stringstream ss;
|
||||
ScopedRef repr(PyObject_Repr(elem));
|
||||
RETURN_IF_PYERROR();
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
ScopedRef ascii(PyUnicode_AsASCIIString(repr.get()));
|
||||
RETURN_IF_PYERROR();
|
||||
ss << "error while calling callback on " << PyBytes_AsString(ascii.get())
|
||||
<< ": handler not registered";
|
||||
#else
|
||||
ss << "error while calling callback on " << PyString_AsString(repr.get())
|
||||
<< ": handler not registered";
|
||||
#endif
|
||||
return Status::SerializationError(ss.str());
|
||||
} else {
|
||||
*result = PyObject_CallMethodObjArgs(context, method_name, elem, NULL);
|
||||
|
||||
Reference in new issue
Block a user