Strange control flow in PyInt_AsLong. When nb_int is called inside
the PyInt_AsLong function, and this returns a long, the value is first retrieved with PyLong_AsLong, but afterwards overwritten by a call to PyInt_AS_LONG. Fixes SF #690253.
This commit is contained in:
parent
81e26590e4
commit
850566b644
|
@ -162,10 +162,10 @@ PyInt_AsLong(register PyObject *op)
|
||||||
if (PyLong_Check(io)) {
|
if (PyLong_Check(io)) {
|
||||||
/* got a long? => retry int conversion */
|
/* got a long? => retry int conversion */
|
||||||
val = PyLong_AsLong((PyObject *)io);
|
val = PyLong_AsLong((PyObject *)io);
|
||||||
if (PyErr_Occurred()) {
|
Py_DECREF(io);
|
||||||
Py_DECREF(io);
|
if ((val == -1) && PyErr_Occurred())
|
||||||
return -1;
|
return -1;
|
||||||
}
|
return val;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue