diff options
author | Guido van Rossum <guido@python.org> | 1997-08-12 14:54:54 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-08-12 14:54:54 +0000 |
commit | 7a46e7f018b2e33057fc0c9dde888bbace8aba2a (patch) | |
tree | 6024cf2b46f2eb0f52e0fd95e12a92e770e9ebf9 /Objects | |
parent | c6df8c5c747e66ac1cce16d65bf7449b652a9516 (diff) | |
download | cpython-7a46e7f018b2e33057fc0c9dde888bbace8aba2a.tar.gz |
Fix mixup about PyErr_NoMemory() prototype.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/object.c | 12 |
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 |