Issue #18408: Fix Py_ReprEnter(), handle PyList_Append() failure

This commit is contained in:
Victor Stinner 2013-07-17 21:58:41 +02:00
parent 095d99ffff
commit e901d1fbdf
1 changed files with 2 additions and 1 deletions

View File

@ -1910,7 +1910,8 @@ Py_ReprEnter(PyObject *obj)
if (PyList_GET_ITEM(list, i) == obj) if (PyList_GET_ITEM(list, i) == obj)
return 1; return 1;
} }
PyList_Append(list, obj); if (PyList_Append(list, obj) < 0)
return -1;
return 0; return 0;
} }