Issue #26200: Restored more safe usages of Py_SETREF.

This commit is contained in:
Serhiy Storchaka 2016-04-11 09:57:37 +03:00
commit 59865e7fe1
3 changed files with 9 additions and 9 deletions

View file

@ -1494,13 +1494,13 @@ float_as_integer_ratio(PyObject *v, PyObject *unused)
/* fold in 2**exponent */
if (exponent > 0) {
Py_XSETREF(numerator,
Py_SETREF(numerator,
long_methods->nb_lshift(numerator, py_exponent));
if (numerator == NULL)
goto error;
}
else {
Py_XSETREF(denominator,
Py_SETREF(denominator,
long_methods->nb_lshift(denominator, py_exponent));
if (denominator == NULL)
goto error;