gh-47146: Fix reference counting in _testcapi.structmember initializer (GH-106862)

This commit is contained in:
Serhiy Storchaka 2023-07-21 12:30:14 +03:00 committed by GitHub
parent fcc816dbff
commit 8d397ee825
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ _PyTestCapi_Init_Structmember(PyObject *m)
if (res < 0) {
return -1;
}
res = PyModule_AddObject(
res = PyModule_AddObjectRef(
m,
"_test_structmembersType_OldAPI",
(PyObject *)&test_structmembersType_OldAPI);