]> 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:26 +0000 (10:42 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Mon, 10 Nov 2014 08:42:26 +0000 (10:42 +0200)
platforms.

Misc/NEWS
Modules/fcntlmodule.c

index 3cb7fd4991c206d5238a50d319a5c4d5fc9c1032..1a4ad5626826c710858da604f19edeee142d7184 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -36,6 +36,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 cf0ac19976f915c8831a393d33472a4e1ca8a4be..93259409652c931741c96ab5c544b57a9098c256 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;