mirror of
https://github.com/python/cpython
synced 2026-09-29 10:35:30 +03:00
gh-98724: Fix warnings on Py_SETREF() usage (#99781)
Cast argument to the expected type.
This commit is contained in:
parent
ae234fbc5c
commit
5556d3e02c
3 changed files with 3 additions and 3 deletions
|
|
@ -4775,7 +4775,7 @@ long_pow(PyObject *v, PyObject *w, PyObject *x)
|
|||
* because we're primarily trying to cut overhead for small powers.
|
||||
*/
|
||||
assert(bi); /* else there is no significant bit */
|
||||
Py_SETREF(z, Py_NewRef(a));
|
||||
Py_SETREF(z, (PyLongObject*)Py_NewRef(a));
|
||||
for (bit = 2; ; bit <<= 1) {
|
||||
if (bit > bi) { /* found the first bit */
|
||||
assert((bi & bit) == 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue