From 069bdcbb25cf7dfd90d5967c2ee3191fbe0e9617 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 10 Nov 2014 10:42:06 +0200 Subject: [PATCH] Issue #22821: Fixed fcntl() with integer argument on 64-bit big-endian platforms. --- Misc/NEWS | 3 +++ Modules/fcntlmodule.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Misc/NEWS b/Misc/NEWS index b79595a3d4..280448bfb8 100644 --- 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. diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c index 41b3cde4b3..9d8b587827 100644 --- a/Modules/fcntlmodule.c +++ b/Modules/fcntlmodule.c @@ -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; -- 2.50.1