summaryrefslogtreecommitdiffstats
path: root/Objects/setobject.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-06-11 00:44:47 (GMT)
committerRaymond Hettinger <python@rcn.com>2008-06-11 00:44:47 (GMT)
commit610a93ea2623ff324c99c52147d78838335ae900 (patch)
treeacc69052d2628f24ab3a0aa48968d50d4c8f1bb0 /Objects/setobject.c
parent363070aa463d9eed4bf815c288067a1716ef3aaa (diff)
downloadcpython-610a93ea2623ff324c99c52147d78838335ae900.zip
cpython-610a93ea2623ff324c99c52147d78838335ae900.tar.gz
cpython-610a93ea2623ff324c99c52147d78838335ae900.tar.bz2
Handle the case with zero arguments.
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r--Objects/setobject.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c
index a892dc8..1127680 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -1312,6 +1312,9 @@ set_intersection_multi(PySetObject *so, PyObject *args)
Py_ssize_t i;
PyObject *result = (PyObject *)so;
+ if (PyTuple_GET_SIZE(args) == 0)
+ return set_copy(so);
+
Py_INCREF(so);
for (i=0 ; i<PyTuple_GET_SIZE(args) ; i++) {
PyObject *other = PyTuple_GET_ITEM(args, i);