mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-99300: Use Py_NewRef() in Python/ directory (#99302)
Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and Py_XNewRef() in C files of the Python/ directory.
This commit is contained in:
parent
f883b7f8ee
commit
d8f239d86e
14 changed files with 41 additions and 80 deletions
|
@ -207,8 +207,7 @@ PyThread_GetInfo(void)
|
|||
if (value == NULL)
|
||||
#endif
|
||||
{
|
||||
Py_INCREF(Py_None);
|
||||
value = Py_None;
|
||||
value = Py_NewRef(Py_None);
|
||||
}
|
||||
PyStructSequence_SET_ITEM(threadinfo, pos++, value);
|
||||
return threadinfo;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue