Kaydet (Commit) 9e8f4ea0 authored tarafından Guido van Rossum's avatar Guido van Rossum

Test for NULL returned from PyObject_NEW().

üst f0b31547
......@@ -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