summaryrefslogtreecommitdiffstats
path: root/Modules/_winapi.c
diff options
context:
space:
mode:
authorAlexander Buchkovsky <olex.buchkovsky@gmail.com>2018-09-04 16:10:28 (GMT)
committerVictor Stinner <vstinner@redhat.com>2018-09-04 16:10:28 (GMT)
commit266f4904a222a784080e29aad0916849e507515d (patch)
treeb4ae212e6a9c6103e38d2d9679566b407bf0e81b /Modules/_winapi.c
parent7917aadb3edb7616d6164c5eaba24df6ac0a5fc6 (diff)
downloadcpython-266f4904a222a784080e29aad0916849e507515d.zip
cpython-266f4904a222a784080e29aad0916849e507515d.tar.gz
cpython-266f4904a222a784080e29aad0916849e507515d.tar.bz2
bpo-34563: Fix for invalid assert on big output of multiprocessing.Process (GH-9027)
Fix for invalid assert on big output of multiprocessing.Process.
Diffstat (limited to 'Modules/_winapi.c')
-rw-r--r--Modules/_winapi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/_winapi.c b/Modules/_winapi.c
index 30f269f..44788e5 100644
--- a/Modules/_winapi.c
+++ b/Modules/_winapi.c
@@ -1338,7 +1338,7 @@ _winapi_PeekNamedPipe_impl(PyObject *module, HANDLE handle, int size)
}
if (_PyBytes_Resize(&buf, nread))
return NULL;
- return Py_BuildValue("Nii", buf, navail, nleft);
+ return Py_BuildValue("NII", buf, navail, nleft);
}
else {
Py_BEGIN_ALLOW_THREADS
@@ -1347,7 +1347,7 @@ _winapi_PeekNamedPipe_impl(PyObject *module, HANDLE handle, int size)
if (!ret) {
return PyErr_SetExcFromWindowsErr(PyExc_OSError, 0);
}
- return Py_BuildValue("ii", navail, nleft);
+ return Py_BuildValue("II", navail, nleft);
}
}
@@ -1355,14 +1355,14 @@ _winapi_PeekNamedPipe_impl(PyObject *module, HANDLE handle, int size)
_winapi.ReadFile
handle: HANDLE
- size: int
+ size: DWORD
overlapped as use_overlapped: bool(accept={int}) = False
[clinic start generated code]*/
static PyObject *
-_winapi_ReadFile_impl(PyObject *module, HANDLE handle, int size,
+_winapi_ReadFile_impl(PyObject *module, HANDLE handle, DWORD size,
int use_overlapped)
-/*[clinic end generated code: output=492029ca98161d84 input=3f0fde92f74de59a]*/
+/*[clinic end generated code: output=d3d5b44a8201b944 input=08c439d03a11aac5]*/
{
DWORD nread;
PyObject *buf;