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

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 13:44:56 +01:00 committed by GitHub
parent 9a7e9f9921
commit c340cbb7f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 92 additions and 173 deletions

View file

@ -291,8 +291,7 @@ _winapi_Overlapped_getbuffer_impl(OverlappedObject *self)
return NULL;
}
res = self->read_buffer ? self->read_buffer : Py_None;
Py_INCREF(res);
return res;
return Py_NewRef(res);
}
/*[clinic input]