]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-92678: Correct return values for errors in PyInit__testcapi (#95664)
authorPablo Galindo Salgado <Pablogsal@gmail.com>
Thu, 4 Aug 2022 21:44:06 +0000 (22:44 +0100)
committerGitHub <noreply@github.com>
Thu, 4 Aug 2022 21:44:06 +0000 (22:44 +0100)
Modules/_testcapimodule.c

index 961616dae63e19758c4832b7af4be1eb6d6d8de3..8087b444939f5ada1d498f632e3e9b3668d3e444 100644 (file)
@@ -7824,7 +7824,7 @@ PyInit__testcapi(void)
 
     PyObject *HeapCTypeWithDict2 = PyType_FromSpec(&HeapCTypeWithDict2_spec);
     if (HeapCTypeWithDict2 == NULL) {
-        return -1;
+        return NULL;
     }
     PyModule_AddObject(m, "HeapCTypeWithDict2", HeapCTypeWithDict2);
 
@@ -7848,7 +7848,7 @@ PyInit__testcapi(void)
 
     PyObject *HeapCTypeWithWeakref2 = PyType_FromSpec(&HeapCTypeWithWeakref2_spec);
     if (HeapCTypeWithWeakref2 == NULL) {
-        return -1;
+        return NULL;
     }
     PyModule_AddObject(m, "HeapCTypeWithWeakref2", HeapCTypeWithWeakref2);