summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2011-04-18 17:47:49 +0000
committerGiampaolo Rodola <g.rodola@gmail.com>2011-04-18 17:47:49 +0000
commitd4ab72aa7318f741735d6c2cf749f49992ef1462 (patch)
treec364f8f402925903b840c450613db6fa418bdd54
parent7b02f209e7418e2964d79ee33b17abcb335968da (diff)
downloadpysendfile-d4ab72aa7318f741735d6c2cf749f49992ef1462.tar.gz
another data type change attempt
-rw-r--r--sendfilemodule.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sendfilemodule.c b/sendfilemodule.c
index 7986655..d050305 100644
--- a/sendfilemodule.c
+++ b/sendfilemodule.c
@@ -68,7 +68,11 @@ method_sendfile(PyObject *self, PyObject *args, PyObject *kwdict)
int sock;
int flags = 0;
int ret;
+#if defined(HAVE_LARGEFILE_SUPPORT)
off_t offset;
+#else
+ long offset;
+#endif
size_t nbytes;
char * head = NULL;
size_t head_len = 0;
@@ -81,9 +85,9 @@ method_sendfile(PyObject *self, PyObject *args, PyObject *kwdict)
if (!PyArg_ParseTupleAndKeywords(args, kwdict,
#if defined(HAVE_LARGEFILE_SUPPORT)
- "iiLl|s#s#i:sendfile",
+ "iiLI|s#s#i:sendfile",
#else
- "iill|s#s#i:sendfile",
+ "iilI|s#s#i:sendfile",
#endif
keywords, &fd, &sock, &offset, &nbytes,
&head, &head_len, &tail, &tail_len,