Commit ea46e4d9 authored by Guido van Rossum's avatar Guido van Rossum

Fix mixup about PyErr_NoMemory() prototype.

parent 741689d5
...@@ -699,8 +699,10 @@ Py_Malloc(nbytes) ...@@ -699,8 +699,10 @@ Py_Malloc(nbytes)
p = malloc(nbytes); p = malloc(nbytes);
if (p != NULL) if (p != NULL)
return p; return p;
else else {
return PyErr_NoMemory(); PyErr_NoMemory();
return NULL;
}
} }
ANY * ANY *
...@@ -715,8 +717,10 @@ Py_Realloc(p, nbytes) ...@@ -715,8 +717,10 @@ Py_Realloc(p, nbytes)
p = realloc(p, nbytes); p = realloc(p, nbytes);
if (p != NULL) if (p != NULL)
return p; return p;
else else {
return PyErr_NoMemory(); PyErr_NoMemory();
return NULL;
}
} }
void void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment