diff options
author | Christian Heimes <christian@cheimes.de> | 2007-12-02 14:31:20 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-12-02 14:31:20 (GMT) |
commit | 217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2 (patch) | |
tree | 4737b4a91359c94953623ab9ee297e9a90f319e4 /Modules/selectmodule.c | |
parent | 1a3284ed69d545e4ef59869998cb8c29233a45fa (diff) | |
download | cpython-217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2.zip cpython-217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2.tar.gz cpython-217cfd1c86c59ed8a55ce6d6b88bbe37309e7ba2.tar.bz2 |
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.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c index 8bb2df8..4925b9d 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; |