Kaydet (Commit) b70e8a19 authored tarafından Christian Heimes's avatar Christian Heimes

and another one

üst d3df2060
...@@ -78,7 +78,7 @@ _PyObject_HasLen(PyObject *o) { ...@@ -78,7 +78,7 @@ _PyObject_HasLen(PyObject *o) {
Py_ssize_t Py_ssize_t
PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue) PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue)
{ {
PyObject *hint; PyObject *hint, *result;
Py_ssize_t res; Py_ssize_t res;
_Py_IDENTIFIER(__length_hint__); _Py_IDENTIFIER(__length_hint__);
res = PyObject_Length(o); res = PyObject_Length(o);
...@@ -98,7 +98,7 @@ PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue) ...@@ -98,7 +98,7 @@ PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue)
} }
return defaultvalue; return defaultvalue;
} }
PyObject *result = PyObject_CallFunctionObjArgs(hint, NULL); result = PyObject_CallFunctionObjArgs(hint, NULL);
Py_DECREF(hint); Py_DECREF(hint);
if (result == NULL) { if (result == NULL) {
if (PyErr_ExceptionMatches(PyExc_TypeError)) { if (PyErr_ExceptionMatches(PyExc_TypeError)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment