]> granicus.if.org Git - python/commitdiff
os.sendfile(): on Linux if offset parameter is passed as NULL we were erroneously...
authorGiampaolo Rodola' <g.rodola@gmail.com>
Tue, 19 Apr 2011 07:47:16 +0000 (09:47 +0200)
committerGiampaolo Rodola' <g.rodola@gmail.com>
Tue, 19 Apr 2011 07:47:16 +0000 (09:47 +0200)
Modules/posixmodule.c

index 8f17bf41348fe30f7492b22163a14739038ac66e..18a67e15997e8b0c03a1d75bc8883ffc45946377 100644 (file)
@@ -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;