This commit is contained in:
Jeremy Hylton 2001-01-03 22:32:16 +00:00
parent a866df806d
commit db60bb5aad
1 changed files with 3 additions and 1 deletions

View File

@ -596,9 +596,11 @@ listextend_internal(PyListObject *self, PyObject *b)
int blen;
register int i;
if (PyObject_Size(b) == 0)
if (PyObject_Size(b) == 0) {
/* short circuit when b is empty */
Py_DECREF(b);
return 0;
}
if (self == (PyListObject*)b) {
/* as in list_ass_slice() we must special case the