summaryrefslogtreecommitdiff
path: root/Modules/selectmodule.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-12-02 14:31:20 +0000
committerChristian Heimes <christian@cheimes.de>2007-12-02 14:31:20 +0000
commitb322e41d3672c465db3aca80419689f1902c6612 (patch)
tree0a4fb14529a5f623c49b0bca97d9af5d2677c056 /Modules/selectmodule.c
parent7d4a05a4ebffb688137ca5b5a92825a756927e7e (diff)
downloadcpython-b322e41d3672c465db3aca80419689f1902c6612.tar.gz
Cleanup: Replaced most PyInt_ aliases with PyLong_ and disabled the aliases in intobject.h
Diffstat (limited to 'Modules/selectmodule.c')
-rw-r--r--Modules/selectmodule.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index 8bb2df85df..4925b9d2a9 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -355,8 +355,8 @@ update_ufd_array(pollObject *self)
i = pos = 0;
while (PyDict_Next(self->dict, &pos, &key, &value)) {
- self->ufds[i].fd = PyInt_AsLong(key);
- self->ufds[i].events = (short)PyInt_AsLong(value);
+ self->ufds[i].fd = PyLong_AsLong(key);
+ self->ufds[i].events = (short)PyLong_AsLong(value);
i++;
}
self->ufd_uptodate = 1;
@@ -386,10 +386,10 @@ poll_register(pollObject *self, PyObject *args)
/* Add entry to the internal dictionary: the key is the
file descriptor, and the value is the event mask. */
- key = PyInt_FromLong(fd);
+ key = PyLong_FromLong(fd);
if (key == NULL)
return NULL;
- value = PyInt_FromLong(events);
+ value = PyLong_FromLong(events);
if (value == NULL) {
Py_DECREF(key);
return NULL;
@@ -421,7 +421,7 @@ poll_unregister(pollObject *self, PyObject *o)
return NULL;
/* Check whether the fd is already in the array */
- key = PyInt_FromLong(fd);
+ key = PyLong_FromLong(fd);
if (key == NULL)
return NULL;
@@ -467,7 +467,7 @@ poll_poll(pollObject *self, PyObject *args)
tout = PyNumber_Int(tout);
if (!tout)
return NULL;
- timeout = PyInt_AsLong(tout);
+ timeout = PyLong_AsLong(tout);
Py_DECREF(tout);
if (timeout == -1 && PyErr_Occurred())
return NULL;
@@ -505,7 +505,7 @@ poll_poll(pollObject *self, PyObject *args)
value = PyTuple_New(2);
if (value == NULL)
goto error;
- num = PyInt_FromLong(self->ufds[i].fd);
+ num = PyLong_FromLong(self->ufds[i].fd);
if (num == NULL) {
Py_DECREF(value);
goto error;
@@ -516,7 +516,7 @@ poll_poll(pollObject *self, PyObject *args)
is a 16-bit short, and IBM assigned POLLNVAL
to be 0x8000, so the conversion to int results
in a negative number. See SF bug #923315. */
- num = PyInt_FromLong(self->ufds[i].revents & 0xffff);
+ num = PyLong_FromLong(self->ufds[i].revents & 0xffff);
if (num == NULL) {
Py_DECREF(value);
goto error;