[Python-checkins] cpython (2.7): Issue #22821: Fixed fcntl() with integer argument on 64-bit big-endian

serhiy.storchaka python-checkins at python.org
Mon Nov 10 10:29:55 CET 2014


https://hg.python.org/cpython/rev/61e99438c237
changeset:   93453:61e99438c237
branch:      2.7
parent:      93448:3a8e0a5359cf
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Mon Nov 10 10:42:06 2014 +0200
summary:
  Issue #22821: Fixed fcntl() with integer argument on 64-bit big-endian
platforms.

files:
  Misc/NEWS             |  3 +++
  Modules/fcntlmodule.c |  4 ++--
  2 files changed, 5 insertions(+), 2 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -37,6 +37,9 @@
 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.
 
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c
--- a/Modules/fcntlmodule.c
+++ b/Modules/fcntlmodule.c
@@ -34,7 +34,7 @@
 {
     int fd;
     int code;
-    long arg;
+    int arg;
     int ret;
     char *str;
     Py_ssize_t len;
@@ -61,7 +61,7 @@
     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;

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list