gh-99300: Use Py_NewRef() in Modules/ directory (#99469)

Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in test C files of the Modules/ directory.
This commit is contained in:
Victor Stinner 2022-11-14 16:21:23 +01:00 committed by GitHub
parent e3d4fed074
commit 3e2f7135e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 66 additions and 130 deletions

View file

@ -1870,8 +1870,7 @@ gc_is_tracked(PyObject *module, PyObject *obj)
result = Py_True;
else
result = Py_False;
Py_INCREF(result);
return result;
return Py_NewRef(result);
}
/*[clinic input]