~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Modules/selectmodule.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1487
1487
        if (nevents < 0) {
1488
1488
                PyErr_Format(PyExc_ValueError,
1489
1489
                        "Length of eventlist must be 0 or positive, got %d",
1490
 
                        nchanges);
 
1490
                        nevents);
1491
1491
                return NULL;
1492
1492
        }
1493
1493
 
1545
1545
                        PyErr_NoMemory();
1546
1546
                        return NULL;
1547
1547
                }
 
1548
                i = 0;
1548
1549
                while ((ei = PyIter_Next(it)) != NULL) {
1549
1550
                        if (!kqueue_event_Check(ei)) {
1550
1551
                                Py_DECREF(ei);
1553
1554
                                        "select.kevent objects");
1554
1555
                                goto error;
1555
1556
                        } else {
1556
 
                                chl[i] = ((kqueue_event_Object *)ei)->e;
 
1557
                                chl[i++] = ((kqueue_event_Object *)ei)->e;
1557
1558
                        }
1558
1559
                        Py_DECREF(ei);
1559
1560
                }
1584
1585
                goto error;
1585
1586
        }
1586
1587
 
1587
 
        for (i=0; i < gotevents; i++) {
 
1588
        for (i = 0; i < gotevents; i++) {
1588
1589
                kqueue_event_Object *ch;
1589
1590
 
1590
1591
                ch = PyObject_New(kqueue_event_Object, &kqueue_event_Type);