Skip to content

Commit cb02dc0

Browse files
authored
[3.11] gh-92678: Correct return values for errors in PyInit__testcapi (#95664)
1 parent 4d37b42 commit cb02dc0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/_testcapimodule.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -7824,7 +7824,7 @@ PyInit__testcapi(void)
78247824

78257825
PyObject *HeapCTypeWithDict2 = PyType_FromSpec(&HeapCTypeWithDict2_spec);
78267826
if (HeapCTypeWithDict2 == NULL) {
7827-
return -1;
7827+
return NULL;
78287828
}
78297829
PyModule_AddObject(m, "HeapCTypeWithDict2", HeapCTypeWithDict2);
78307830

@@ -7848,7 +7848,7 @@ PyInit__testcapi(void)
78487848

78497849
PyObject *HeapCTypeWithWeakref2 = PyType_FromSpec(&HeapCTypeWithWeakref2_spec);
78507850
if (HeapCTypeWithWeakref2 == NULL) {
7851-
return -1;
7851+
return NULL;
78527852
}
78537853
PyModule_AddObject(m, "HeapCTypeWithWeakref2", HeapCTypeWithWeakref2);
78547854

0 commit comments

Comments
 (0)