summaryrefslogtreecommitdiffstats
path: root/Modules/selectmodule.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-08-13 12:26:19 (GMT)
committerGeorg Brandl <georg@python.org>2009-08-13 12:26:19 (GMT)
commitd80344f8d3dec44c3045964c4f5a7710a502bdf5 (patch)
treedf8ca536cab9e081535d403e49b4914e8e0b628b /Modules/selectmodule.c
parenta85ee5cfb612e5933c9ef2eb0b24a103acc14ef7 (diff)
downloadcpython-d80344f8d3dec44c3045964c4f5a7710a502bdf5.zip
cpython-d80344f8d3dec44c3045964c4f5a7710a502bdf5.tar.gz
cpython-d80344f8d3dec44c3045964c4f5a7710a502bdf5.tar.bz2
Merged revisions 74055 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k (Selected changes only.) ................ r74055 | alexandre.vassalotti | 2009-07-17 11:18:18 +0200 (Fr, 17 Jul 2009) | 55 lines Merged revisions 73995,74002,74005,74007-74008,74011,74019-74023 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r74008 | benjamin.peterson | 2009-07-14 20:46:42 -0400 (Tue, 14 Jul 2009) | 1 line update year ........ r74011 | ezio.melotti | 2009-07-15 13:07:04 -0400 (Wed, 15 Jul 2009) | 1 line methods' names pep8ification ........ r74019 | amaury.forgeotdarc | 2009-07-15 17:29:27 -0400 (Wed, 15 Jul 2009) | 2 lines #6076 Add a title to the IDLE Preferences window. ........ r74020 | georg.brandl | 2009-07-16 03:18:07 -0400 (Thu, 16 Jul 2009) | 1 line #5910: fix kqueue for calls with more than one event. ........ r74021 | georg.brandl | 2009-07-16 03:33:04 -0400 (Thu, 16 Jul 2009) | 1 line #6486: start with built in functions rather than "built in objects". ........ r74022 | georg.brandl | 2009-07-16 03:38:35 -0400 (Thu, 16 Jul 2009) | 1 line #6481: fix typo in os.system() replacement. ........ r74023 | jesse.noller | 2009-07-16 10:23:04 -0400 (Thu, 16 Jul 2009) | 1 line Issue 6433: multiprocessing.pool.map hangs on empty list ........ ................
Diffstat (limited to 'Modules/selectmodule.c')
-rw-r--r--Modules/selectmodule.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index 191296e..13ac115 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -1492,7 +1492,7 @@ kqueue_queue_control(kqueue_queue_Object *self, PyObject *args)
if (nevents < 0) {
PyErr_Format(PyExc_ValueError,
"Length of eventlist must be 0 or positive, got %d",
- nchanges);
+ nevents);
return NULL;
}
@@ -1550,6 +1550,7 @@ kqueue_queue_control(kqueue_queue_Object *self, PyObject *args)
PyErr_NoMemory();
return NULL;
}
+ i = 0;
while ((ei = PyIter_Next(it)) != NULL) {
if (!kqueue_event_Check(ei)) {
Py_DECREF(ei);
@@ -1558,7 +1559,7 @@ kqueue_queue_control(kqueue_queue_Object *self, PyObject *args)
"select.kevent objects");
goto error;
} else {
- chl[i] = ((kqueue_event_Object *)ei)->e;
+ chl[i++] = ((kqueue_event_Object *)ei)->e;
}
Py_DECREF(ei);
}
@@ -1589,7 +1590,7 @@ kqueue_queue_control(kqueue_queue_Object *self, PyObject *args)
goto error;
}
- for (i=0; i < gotevents; i++) {
+ for (i = 0; i < gotevents; i++) {
kqueue_event_Object *ch;
ch = PyObject_New(kqueue_event_Object, &kqueue_event_Type);