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

Test for NULL returned from PyObject_NEW().

parent ede865eb
......@@ -19,6 +19,9 @@ PyRange_New(long start, long len, long step, int reps)
{
rangeobject *obj = PyObject_NEW(rangeobject, &PyRange_Type);
if (obj == NULL)
return NULL;
obj->start = start;
obj->len = len;
obj->step = step;
......
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