diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2011-04-18 17:34:20 +0000 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2011-04-18 17:34:20 +0000 |
commit | 7b02f209e7418e2964d79ee33b17abcb335968da (patch) | |
tree | 1bb205902c26f8f6f5fdaf344c5aac28de4f2176 | |
parent | f162f44c80684faff817466cdab5d47de802f299 (diff) | |
download | pysendfile-7b02f209e7418e2964d79ee33b17abcb335968da.tar.gz |
revert last 2 commits
-rw-r--r-- | sendfilemodule.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/sendfilemodule.c b/sendfilemodule.c index ac49d97..7986655 100644 --- a/sendfilemodule.c +++ b/sendfilemodule.c @@ -80,7 +80,11 @@ method_sendfile(PyObject *self, PyObject *args, PyObject *kwdict) "trailer", "flags", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwdict, - "iiLk|s#s#i:sendfile", +#if defined(HAVE_LARGEFILE_SUPPORT) + "iiLl|s#s#i:sendfile", +#else + "iill|s#s#i:sendfile", +#endif keywords, &fd, &sock, &offset, &nbytes, &head, &head_len, &tail, &tail_len, &flags)) { @@ -241,7 +245,11 @@ method_sendfile(PyObject *self, PyObject *args, PyObject *kwdict) "trailer", "flags", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwdict, - "iiLk|s#s#i:sendfile", +#if defined(HAVE_LARGEFILE_SUPPORT) + "iiLL|s#s#i:sendfile", +#else + "iill|s#s#i:sendfile", +#endif keywords, &out_fd, &in_fd, &offset, &nbytes, &head, &head_len, &tail, &tail_len, &flags)) { @@ -328,8 +336,12 @@ method_sendfile(PyObject *self, PyObject *args, PyObject *kwdict) ssize_t sent; if (!PyArg_ParseTuple(args, - "iiLk", - &out_fd, &in_fd, &offset, &nbytes)) { +#if defined(HAVE_LARGEFILE_SUPPORT) + "iiLL", +#else + "iill", +#endif + &out_fd, &in_fd, &offset, &nbytes)) { return NULL; } sent = sendfile(out_fd, in_fd, &offset, nbytes); |