summaryrefslogtreecommitdiffstats
path: root/Modules/_winapi.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2022-12-03 19:52:21 (GMT)
committerGitHub <noreply@github.com>2022-12-03 19:52:21 (GMT)
commita87c46eab3c306b1c5b8a072b7b30ac2c50651c0 (patch)
tree92c0ebdb6abd303ea967c0bd999d839a98f84494 /Modules/_winapi.c
parentc68573b339320409b038501fdd7d4f8a56766275 (diff)
downloadcpython-a87c46eab3c306b1c5b8a072b7b30ac2c50651c0.zip
cpython-a87c46eab3c306b1c5b8a072b7b30ac2c50651c0.tar.gz
cpython-a87c46eab3c306b1c5b8a072b7b30ac2c50651c0.tar.bz2
bpo-15999: Accept arbitrary values for boolean parameters. (#15609)
builtins and extension module functions and methods that expect boolean values for parameters now accept any Python object rather than just a bool or int type. This is more consistent with how native Python code itself behaves.
Diffstat (limited to 'Modules/_winapi.c')
-rw-r--r--Modules/_winapi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/_winapi.c b/Modules/_winapi.c
index bb4514c..f4d982b 100644
--- a/Modules/_winapi.c
+++ b/Modules/_winapi.c
@@ -404,13 +404,13 @@ _winapi_CloseHandle_impl(PyObject *module, HANDLE handle)
_winapi.ConnectNamedPipe
handle: HANDLE
- overlapped as use_overlapped: bool(accept={int}) = False
+ overlapped as use_overlapped: bool = False
[clinic start generated code]*/
static PyObject *
_winapi_ConnectNamedPipe_impl(PyObject *module, HANDLE handle,
int use_overlapped)
-/*[clinic end generated code: output=335a0e7086800671 input=34f937c1c86e5e68]*/
+/*[clinic end generated code: output=335a0e7086800671 input=a80e56e8bd370e31]*/
{
BOOL success;
OverlappedObject *overlapped = NULL;
@@ -1576,13 +1576,13 @@ _winapi.ReadFile
handle: HANDLE
size: DWORD
- overlapped as use_overlapped: bool(accept={int}) = False
+ overlapped as use_overlapped: bool = False
[clinic start generated code]*/
static PyObject *
_winapi_ReadFile_impl(PyObject *module, HANDLE handle, DWORD size,
int use_overlapped)
-/*[clinic end generated code: output=d3d5b44a8201b944 input=08c439d03a11aac5]*/
+/*[clinic end generated code: output=d3d5b44a8201b944 input=4f82f8e909ad91ad]*/
{
DWORD nread;
PyObject *buf;
@@ -1862,13 +1862,13 @@ _winapi.WriteFile
handle: HANDLE
buffer: object
- overlapped as use_overlapped: bool(accept={int}) = False
+ overlapped as use_overlapped: bool = False
[clinic start generated code]*/
static PyObject *
_winapi_WriteFile_impl(PyObject *module, HANDLE handle, PyObject *buffer,
int use_overlapped)
-/*[clinic end generated code: output=2ca80f6bf3fa92e3 input=11eae2a03aa32731]*/
+/*[clinic end generated code: output=2ca80f6bf3fa92e3 input=2badb008c8a2e2a0]*/
{
Py_buffer _buf, *buf;
DWORD len, written;