summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-08-12 14:54:54 (GMT)
committerGuido van Rossum <guido@python.org>1997-08-12 14:54:54 (GMT)
commitea46e4d93cd52501461125ff52c3d4104fed68d0 (patch)
treee29d9e617e8cbb897c4a3d2630f7699bbac035ab
parent741689d5f3570a2e56bf166e6dfc6417749b0790 (diff)
downloadcpython-ea46e4d93cd52501461125ff52c3d4104fed68d0.zip
cpython-ea46e4d93cd52501461125ff52c3d4104fed68d0.tar.gz
cpython-ea46e4d93cd52501461125ff52c3d4104fed68d0.tar.bz2
Fix mixup about PyErr_NoMemory() prototype.
-rw-r--r--Objects/object.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/Objects/object.c b/Objects/object.c
index 83829d2..6adc2be 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