[Python-3000-checkins] r58612 - python/branches/py3k/Objects/fileobject.c
georg.brandl
python-3000-checkins at python.org
Tue Oct 23 20:25:21 CEST 2007
Author: georg.brandl
Date: Tue Oct 23 20:25:20 2007
New Revision: 58612
Modified:
python/branches/py3k/Objects/fileobject.c
Log:
Remove redundant PyInt/PyLong checks.
Modified: python/branches/py3k/Objects/fileobject.c
==============================================================================
--- python/branches/py3k/Objects/fileobject.c (original)
+++ python/branches/py3k/Objects/fileobject.c Tue Oct 23 20:25:20 2007
@@ -206,10 +206,7 @@
int fd;
PyObject *meth;
- if (PyInt_Check(o)) {
- fd = PyInt_AsLong(o);
- }
- else if (PyLong_Check(o)) {
+ if (PyLong_Check(o)) {
fd = PyLong_AsLong(o);
}
else if ((meth = PyObject_GetAttrString(o, "fileno")) != NULL)
@@ -219,11 +216,7 @@
if (fno == NULL)
return -1;
- if (PyInt_Check(fno)) {
- fd = PyInt_AsLong(fno);
- Py_DECREF(fno);
- }
- else if (PyLong_Check(fno)) {
+ if (PyLong_Check(fno)) {
fd = PyLong_AsLong(fno);
Py_DECREF(fno);
}
More information about the Python-3000-checkins
mailing list