Fixed bug #1081: file.seek allows float arguments
diff --git a/Modules/_fileio.c b/Modules/_fileio.c
index c357a73..0fd8b66 100644
--- a/Modules/_fileio.c
+++ b/Modules/_fileio.c
@@ -556,6 +556,10 @@
 	if (posobj == NULL)
 		pos = 0;
 	else {
+		if(PyFloat_Check(posobj)) {
+			PyErr_SetString(PyExc_TypeError, "an integer is required");
+			return NULL;
+		}
 #if !defined(HAVE_LARGEFILE_SUPPORT)
 		pos = PyInt_AsLong(posobj);
 #else