summaryrefslogtreecommitdiff
path: root/Objects
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-08-12 14:54:54 +0000
committerGuido van Rossum <guido@python.org>1997-08-12 14:54:54 +0000
commit7a46e7f018b2e33057fc0c9dde888bbace8aba2a (patch)
tree6024cf2b46f2eb0f52e0fd95e12a92e770e9ebf9 /Objects
parentc6df8c5c747e66ac1cce16d65bf7449b652a9516 (diff)
downloadcpython-7a46e7f018b2e33057fc0c9dde888bbace8aba2a.tar.gz
Fix mixup about PyErr_NoMemory() prototype.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/object.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/Objects/object.c b/Objects/object.c
index 83829d26c2..6adc2be113 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -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