Skip to content

Commit 34a0e7a

Browse files
authored
[3.12] Revert "[3.12] gh-69214: Fix fcntl.ioctl() request type (#119498) (#1… (#119905)
Revert "[3.12] gh-69214: Fix fcntl.ioctl() request type (#119498) (#119505)" This reverts commit 078da88. The change modified how negative values, like termios.TIOCSWINSZ, was treated and is actually backward incompatible.
1 parent 6d9677d commit 34a0e7a

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

Misc/NEWS.d/next/Library/2024-05-24-11-47-08.gh-issue-69214.Grl6zF.rst

Lines changed: 0 additions & 3 deletions
This file was deleted.

Modules/clinic/fcntlmodule.c.h

Lines changed: 5 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/fcntlmodule.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ fcntl_fcntl_impl(PyObject *module, int fd, int code, PyObject *arg)
108108
fcntl.ioctl
109109
110110
fd: fildes
111-
request as code: unsigned_long(bitwise=True)
111+
request as code: unsigned_int(bitwise=True)
112112
arg as ob_arg: object(c_default='NULL') = 0
113113
mutate_flag as mutate_arg: bool = True
114114
/
@@ -144,9 +144,9 @@ code.
144144
[clinic start generated code]*/
145145

146146
static PyObject *
147-
fcntl_ioctl_impl(PyObject *module, int fd, unsigned long code,
147+
fcntl_ioctl_impl(PyObject *module, int fd, unsigned int code,
148148
PyObject *ob_arg, int mutate_arg)
149-
/*[clinic end generated code: output=3d8eb6828666cea1 input=cee70f6a27311e58]*/
149+
/*[clinic end generated code: output=7f7f5840c65991be input=967b4a4cbeceb0a8]*/
150150
{
151151
#define IOCTL_BUFSZ 1024
152152
/* We use the unsigned non-checked 'I' format for the 'code' parameter

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy