mirror of
https://github.com/python/cpython.git
synced 2024-11-24 10:24:35 +08:00
and another one
This commit is contained in:
parent
d3df2060a6
commit
b70e8a1958
@ -78,7 +78,7 @@ _PyObject_HasLen(PyObject *o) {
|
||||
Py_ssize_t
|
||||
PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue)
|
||||
{
|
||||
PyObject *hint;
|
||||
PyObject *hint, *result;
|
||||
Py_ssize_t res;
|
||||
_Py_IDENTIFIER(__length_hint__);
|
||||
res = PyObject_Length(o);
|
||||
@ -98,7 +98,7 @@ PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue)
|
||||
}
|
||||
return defaultvalue;
|
||||
}
|
||||
PyObject *result = PyObject_CallFunctionObjArgs(hint, NULL);
|
||||
result = PyObject_CallFunctionObjArgs(hint, NULL);
|
||||
Py_DECREF(hint);
|
||||
if (result == NULL) {
|
||||
if (PyErr_ExceptionMatches(PyExc_TypeError)) {
|
||||
|
Loading…
Reference in New Issue
Block a user