diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2011-04-20 17:00:25 +0000 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2011-04-20 17:00:25 +0000 |
commit | f492d472190048e610755ec8a29260f3cc71606d (patch) | |
tree | 85229c5e4f3d13e7284c33de35ace5cdbe8ac4f3 | |
parent | a804c91d4689a21f7850b6e4e48c39e538ab3f1f (diff) | |
download | pysendfile-f492d472190048e610755ec8a29260f3cc71606d.tar.gz |
on Solaris return long instead of int
-rw-r--r-- | sendfilemodule.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sendfilemodule.c b/sendfilemodule.c index d34a06b..e1bfbc6 100644 --- a/sendfilemodule.c +++ b/sendfilemodule.c @@ -363,7 +363,8 @@ method_sendfile(PyObject *self, PyObject *args, PyObject *kwdict) sent = sendfile(out_fd, in_fd, &offset, nbytes); if (sent == -1) return PyErr_SetFromErrno(PyExc_OSError); - return Py_BuildValue("i", sent); + // http://www.barcodeschool.com/2010/04/ssize_t-type-problem/ + return Py_BuildValue("l", sent); } #else /* --- end SUN OS --- */ |