mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
gh-99300: Replace Py_INCREF() with Py_NewRef() (#99530)
Replace Py_INCREF() and Py_XINCREF() using a cast with Py_NewRef() and Py_XNewRef().
This commit is contained in:
parent
19c1462e8d
commit
8211cf5d28
18 changed files with 40 additions and 74 deletions
|
|
@ -1114,8 +1114,7 @@ OrderedDict_popitem_impl(PyODictObject *self, int last)
|
|||
}
|
||||
|
||||
node = last ? _odict_LAST(self) : _odict_FIRST(self);
|
||||
key = _odictnode_KEY(node);
|
||||
Py_INCREF(key);
|
||||
key = Py_NewRef(_odictnode_KEY(node));
|
||||
value = _odict_popkey_hash((PyObject *)self, key, NULL, _odictnode_HASH(node));
|
||||
if (value == NULL)
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue