This is part of SF patch #424992.
*indexptr = end;
return Py_BuildValue("c", (char)x);
}
- break;
case('E'): case('G'): case('L'): case('Q'):
case('U'): case('l'): case('u'):
/* Otherwise, return a string containing the group name */
return Py_BuildValue("s#", pattern+index, end-index);
}
- break;
case('0'):
{
*indexptr = i;
return Py_BuildValue("c", (unsigned char)octval);
}
- break;
+
case('1'): case('2'): case('3'): case('4'):
case('5'): case('6'): case('7'): case('8'):
case('9'):
return Py_BuildValue("i", pattern[index]-'0');
}
}
- break;
default:
/* It's some unknown escape like \s, so return a string containing
static int
update_ufd_array(pollObject *self)
{
- int i, j, pos;
+ int i, pos;
PyObject *key, *value;
self->ufd_len = PyDict_Size(self->dict);
}
i = pos = 0;
- while ((j = PyDict_Next(self->dict, &pos, &key, &value))) {
+ while (PyDict_Next(self->dict, &pos, &key, &value)) {
self->ufds[i].fd = PyInt_AsLong(key);
- self->ufds[i].events = PyInt_AsLong(value);
+ self->ufds[i].events = (short)PyInt_AsLong(value);
i++;
}
self->ufd_uptodate = 1;
if (!PyArg_Parse(args, "i", &t))
return NULL;
/* alarm() returns the number of seconds remaining */
- return PyInt_FromLong(alarm(t));
+ return PyInt_FromLong((long)alarm(t));
}
static char alarm_doc[] =
DL_EXPORT(void)
initxreadlines(void)
{
- PyObject *m;
-
XReadlinesObject_Type.ob_type = &PyType_Type;
- m = Py_InitModule("xreadlines", xreadlines_functions);
+ Py_InitModule("xreadlines", xreadlines_functions);
}