]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix mixup about PyErr_NoMemory() prototype.
authorGuido van Rossum <guido@python.org>
Tue, 12 Aug 1997 14:54:54 +0000 (14:54 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 12 Aug 1997 14:54:54 +0000 (14:54 +0000)
Objects/object.c

index 83829d26c2631a312451a1f3ced5a4ff249f7b06..6adc2be113b164d3877899a582dd49c52a420a04 100644 (file)
@@ -699,8 +699,10 @@ Py_Malloc(nbytes)
        p = malloc(nbytes);
        if (p != NULL)
                return p;
-       else
-               return PyErr_NoMemory();
+       else {
+               PyErr_NoMemory();
+               return NULL;
+       }
 }
 
 ANY *
@@ -715,8 +717,10 @@ Py_Realloc(p, nbytes)
        p = realloc(p, nbytes);
        if (p != NULL)
                return p;
-       else
-               return PyErr_NoMemory();
+       else {
+               PyErr_NoMemory();
+               return NULL;
+       }
 }
 
 void