diff options
author | Guido van Rossum <guido@python.org> | 1997-08-12 14:54:54 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-08-12 14:54:54 (GMT) |
commit | ea46e4d93cd52501461125ff52c3d4104fed68d0 (patch) | |
tree | e29d9e617e8cbb897c4a3d2630f7699bbac035ab /Objects | |
parent | 741689d5f3570a2e56bf166e6dfc6417749b0790 (diff) | |
download | cpython-ea46e4d93cd52501461125ff52c3d4104fed68d0.zip cpython-ea46e4d93cd52501461125ff52c3d4104fed68d0.tar.gz cpython-ea46e4d93cd52501461125ff52c3d4104fed68d0.tar.bz2 |
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 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 |