]> granicus.if.org Git - python/commitdiff
Issue #22821: Fixed fcntl() with integer argument on 64-bit big-endian
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 10 Nov 2014 08:42:06 +0000 (10:42 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Mon, 10 Nov 2014 08:42:06 +0000 (10:42 +0200)
platforms.

Misc/NEWS
Modules/fcntlmodule.c

index b79595a3d45ba3b64df202e4907913e37caaf808..280448bfb8eb83faf8d79e4e1778c90832ae5210 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -37,6 +37,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #22821: Fixed fcntl() with integer argument on 64-bit big-endian
+  platforms.
+
 - Issues #814253, #9179: Group references and conditional group references now
   work in lookbehind assertions in regular expressions.
 
index 41b3cde4b394af5c1a735a6f6cbcf8588170e058..9d8b58782730a75425f1417cecf23d4df778fedb 100644 (file)
@@ -34,7 +34,7 @@ fcntl_fcntl(PyObject *self, PyObject *args)
 {
     int fd;
     int code;
-    long arg;
+    int arg;
     int ret;
     char *str;
     Py_ssize_t len;
@@ -61,7 +61,7 @@ fcntl_fcntl(PyObject *self, PyObject *args)
     PyErr_Clear();
     arg = 0;
     if (!PyArg_ParseTuple(args,
-         "O&i|l;fcntl requires a file or file descriptor,"
+         "O&i|I;fcntl requires a file or file descriptor,"
          " an integer and optionally a third integer or a string",
                           conv_descriptor, &fd, &code, &arg)) {
       return NULL;