Skip to content

Commit

Permalink
use sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
wjones127 committed Jan 11, 2024
1 parent c539894 commit f1d7f01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/pyarrow/src/arrow/python/common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class PythonErrorDetail : public StatusDetail {
for (Py_ssize_t i = 0; i < num_lines; ++i) {
Py_ssize_t line_size;

PyObject* line = PyList_GET_ITEM(formatted.obj(), i);
PyObject* line = PySequence_GetItem(formatted.obj(), i);
RETURN_IF_PYERROR();

const char* data = PyUnicode_AsUTF8AndSize(line, &line_size);
Expand Down

0 comments on commit f1d7f01

Please sign in to comment.