[Python-checkins] cpython: Issue #10812: Revert os.lseek change.
ross.lagerwall
python-checkins at python.org
Thu Mar 17 20:56:21 CET 2011
http://hg.python.org/cpython/rev/8945e087a5a6
changeset: 68658:8945e087a5a6
user: Ross Lagerwall <rosslagerwall at gmail.com>
date: Thu Mar 17 21:54:07 2011 +0200
summary:
Issue #10812: Revert os.lseek change.
files:
Modules/posixmodule.c
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -6080,7 +6080,8 @@
#else
off_t pos, res;
#endif
- if (!PyArg_ParseTuple(args, "iO&i:lseek", &fd, _parse_off_t, &pos, &how))
+ PyObject *posobj;
+ if (!PyArg_ParseTuple(args, "iOi:lseek", &fd, &posobj, &how))
return NULL;
#ifdef SEEK_SET
/* Turn 0, 1, 2 into SEEK_{SET,CUR,END} */
@@ -6091,6 +6092,11 @@
}
#endif /* SEEK_END */
+#if !defined(HAVE_LARGEFILE_SUPPORT)
+ pos = PyLong_AsLong(posobj);
+#else
+ pos = PyLong_AsLongLong(posobj);
+#endif
if (PyErr_Occurred())
return NULL;
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list