if (!set) set = PyTuple_New(0);
else Py_INCREF(set);
if (!PySequence_Check(set)) TYERR("want a sequence");
- n = PySequence_Size(set);
- l = PyList_New(0);
- if (PyErr_Occurred()) goto end;
+ n = PySequence_Size(set); if (n < 0) goto end;
+ l = PyList_New(0); if (!l) goto end;
if (dfl < 0) VALERR("key size cannot be negative");
x = PyInt_FromLong(dfl);
PyList_Append(l, x);