summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2012-01-03 20:33:29 +0000
committerGiampaolo Rodola <g.rodola@gmail.com>2012-01-03 20:33:29 +0000
commit7c35a81eec6a20933157d708401acadc9496b9c6 (patch)
treec77b76a9c2fd90326b0ff37c81732f35dddce00f
parenta8900bc6d7ea58cf195150a0cb5c161b290f4487 (diff)
downloadpysendfile-7c35a81eec6a20933157d708401acadc9496b9c6.tar.gz
use Py_ssize_t on *BSD
-rw-r--r--sendfilemodule.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sendfilemodule.c b/sendfilemodule.c
index b22c0c5..268a904 100644
--- a/sendfilemodule.c
+++ b/sendfilemodule.c
@@ -79,13 +79,13 @@ method_sendfile(PyObject *self, PyObject *args, PyObject *kwdict)
int fd;
int sock;
int flags = 0;
- int ret;
off_t offset;
- size_t nbytes;
+ Py_ssize_t ret;
+ Py_ssize_t nbytes;
char * head = NULL;
- size_t head_len = 0;
char * tail = NULL;
- size_t tail_len = 0;
+ Py_ssize_t head_len = 0;
+ Py_ssize_t tail_len = 0;
off_t sent;
struct sf_hdtr hdtr;
PyObject *offobj;
@@ -93,7 +93,7 @@ method_sendfile(PyObject *self, PyObject *args, PyObject *kwdict)
"trailer", "flags", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kwdict,
- "iiOI|s#s#i:sendfile",
+ "iiOn|s#s#i:sendfile",
keywords, &fd, &sock, &offobj, &nbytes,
&head, &head_len, &tail, &tail_len,
&flags)) {