diff options
author | Victor Stinner <vstinner@python.org> | 2022-11-16 17:34:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-16 17:34:24 (GMT) |
commit | 8211cf5d287acfd815b6a7f6471cdf83dcd2bb9b (patch) | |
tree | 510409237622aa30dfc6833602bdde97c578f2bb /Python/hamt.c | |
parent | 19c1462e8dca3319c8290e2edcce482bd18cb018 (diff) | |
download | cpython-8211cf5d287acfd815b6a7f6471cdf83dcd2bb9b.zip cpython-8211cf5d287acfd815b6a7f6471cdf83dcd2bb9b.tar.gz cpython-8211cf5d287acfd815b6a7f6471cdf83dcd2bb9b.tar.bz2 |
gh-99300: Replace Py_INCREF() with Py_NewRef() (#99530)
Replace Py_INCREF() and Py_XINCREF() using a cast with Py_NewRef()
and Py_XNewRef().
Diffstat (limited to 'Python/hamt.c')
-rw-r--r-- | Python/hamt.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/hamt.c b/Python/hamt.c index 4e61a1f..c4e47eb 100644 --- a/Python/hamt.c +++ b/Python/hamt.c @@ -838,8 +838,7 @@ hamt_node_bitmap_assoc(PyHamtNode_Bitmap *self, if (self->b_array[j] == NULL) { new_node->a_array[i] = - (PyHamtNode *)self->b_array[j + 1]; - Py_INCREF(new_node->a_array[i]); + (PyHamtNode *)Py_NewRef(self->b_array[j + 1]); } else { int32_t rehash = hamt_hash(self->b_array[j]); |