diff options
author | Giampaolo Rodola' <g.rodola@gmail.com> | 2011-04-19 07:47:16 (GMT) |
---|---|---|
committer | Giampaolo Rodola' <g.rodola@gmail.com> | 2011-04-19 07:47:16 (GMT) |
commit | ff1a73590d13279e0864872bf65e1788a3ad7678 (patch) | |
tree | 5d55dc720c7a583092359912d7120b01547ec731 /Modules | |
parent | e8d2d2d2b2fd980028f6b2aa55c5278a120459d8 (diff) | |
download | cpython-ff1a73590d13279e0864872bf65e1788a3ad7678.zip cpython-ff1a73590d13279e0864872bf65e1788a3ad7678.tar.gz cpython-ff1a73590d13279e0864872bf65e1788a3ad7678.tar.bz2 |
os.sendfile(): on Linux if offset parameter is passed as NULL we were erroneously returning a (bytes_sent, None) tuple instead of bytes_sent
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/posixmodule.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 8f17bf4..18a67e1 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -6450,8 +6450,7 @@ done: Py_END_ALLOW_THREADS if (ret < 0) return posix_error(); - Py_INCREF(Py_None); - return Py_BuildValue("nO", ret, Py_None); + return Py_BuildValue("n", ret); } #endif if (!_parse_off_t(offobj, &offset)) @@ -8730,7 +8729,7 @@ posix_fchownat(PyObject *self, PyObject *args) long uid, gid; int flags = 0; char *path; - + if (!PyArg_ParseTuple(args, "iO&ll|i:fchownat", &dirfd, PyUnicode_FSConverter, &opath, &uid, &gid, &flags)) return NULL; |