mirror of
https://github.com/python/cpython.git
synced 2025-10-06 23:21:06 +00:00
gh-99300: Use Py_NewRef() in Objects/ directory (#99335)
Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in C files of the Objects/ directory.
This commit is contained in:
parent
2f4af2d99c
commit
584e55bd34
8 changed files with 120 additions and 244 deletions
|
@ -389,8 +389,7 @@ reversed_new_impl(PyTypeObject *type, PyObject *seq)
|
|||
return NULL;
|
||||
|
||||
ro->index = n-1;
|
||||
Py_INCREF(seq);
|
||||
ro->seq = seq;
|
||||
ro->seq = Py_NewRef(seq);
|
||||
return (PyObject *)ro;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue