]> granicus.if.org Git - python/commitdiff
list2set(): correct return value (an int, not a PyObject*).
authorBarry Warsaw <barry@python.org>
Mon, 16 Dec 1996 18:15:34 +0000 (18:15 +0000)
committerBarry Warsaw <barry@python.org>
Mon, 16 Dec 1996 18:15:34 +0000 (18:15 +0000)
Modules/selectmodule.c

index dfe95484cfd862076a011e40d3195217cc0bc6a1..047c0d437c8b42cb75ac23ab12f59c005b8edb4a 100644 (file)
@@ -101,7 +101,7 @@ list2set(list, set, fd2obj)
 
                /* any intervening fileno() calls could decr this refcnt */
                if (!(o = PyList_GetItem(list, i)))
-                    return NULL;
+                    return -1;
 
                Py_INCREF(o);