Skip to content

Commit d915b08

Browse files
Issue python#22821: Fixed fcntl() with integer argument on 64-bit big-endian
platforms.
1 parent 86e9b6b commit d915b08

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎Misc/NEWS‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ Core and Builtins
3636
Library
3737
-------
3838

39+
- Issue #22821: Fixed fcntl() with integer argument on 64-bit big-endian
40+
platforms.
41+
3942
- Issues #814253, #9179: Group references and conditional group references now
4043
work in lookbehind assertions in regular expressions.
4144

‎Modules/fcntlmodule.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fcntl_fcntl(PyObject *self, PyObject *args)
3434
{
3535
int fd;
3636
int code;
37-
long arg;
37+
int arg;
3838
int ret;
3939
char *str;
4040
Py_ssize_t len;
@@ -61,7 +61,7 @@ fcntl_fcntl(PyObject *self, PyObject *args)
6161
PyErr_Clear();
6262
arg = 0;
6363
if (!PyArg_ParseTuple(args,
64-
"O&i|l;fcntl requires a file or file descriptor,"
64+
"O&i|I;fcntl requires a file or file descriptor,"
6565
" an integer and optionally a third integer or a string",
6666
conv_descriptor, &fd, &code, &arg)) {
6767
return NULL;

0 commit comments

Comments
 (0)