mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Issue #26200: Restored more safe usages of Py_SETREF.
This commit is contained in:
commit
59865e7fe1
3 changed files with 9 additions and 9 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue