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

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-13 16:04:33 +01:00 committed by GitHub
parent 0bedc28d14
commit bbba3f3f43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 41 additions and 82 deletions

View file

@ -202,6 +202,5 @@ TESTNAME(PyObject *error(const char*))
Py_DECREF(Py_None);
}
Py_INCREF(Py_None);
return Py_None;
return Py_NewRef(Py_None);
}