Commit e18df23d authored by Benjamin Peterson's avatar Benjamin Peterson

Merged revisions 72518 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r72518 | benjamin.peterson | 2009-05-09 14:18:36 -0500 (Sat, 09 May 2009) | 1 line

  clear error state properly
........
parent 3131bb10
......@@ -98,6 +98,7 @@ _PyObject_LengthHint(PyObject *o, Py_ssize_t defaultvalue)
if (ro == NULL) {
if (!PyErr_ExceptionMatches(PyExc_TypeError))
return -1;
PyErr_Clear();
return defaultvalue;
}
rv = PyLong_Check(ro) ? PyLong_AsSsize_t(ro) : defaultvalue;
......
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