summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2015-05-13 15:58:35 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2015-05-13 15:58:35 (GMT)
commit77772c0e7b8bcc21ddcfbc1be84df34bbd84942b (patch)
treefa45e61ab766bc5fb1ba5d2472157e552cb24a23 /Modules
parent14ef1a12c7379623b11dd7a24f2095cb8e6c9656 (diff)
downloadcpython-77772c0e7b8bcc21ddcfbc1be84df34bbd84942b.zip
cpython-77772c0e7b8bcc21ddcfbc1be84df34bbd84942b.tar.gz
cpython-77772c0e7b8bcc21ddcfbc1be84df34bbd84942b.tar.bz2
Issue #20172: Update clinicizations to current clinic.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_winapi.c93
-rw-r--r--Modules/clinic/_winapi.c.h133
2 files changed, 130 insertions, 96 deletions
diff --git a/Modules/_winapi.c b/Modules/_winapi.c
index 83c3a3b..3e7f187 100644
--- a/Modules/_winapi.c
+++ b/Modules/_winapi.c
@@ -391,8 +391,9 @@ _winapi.ConnectNamedPipe
[clinic start generated code]*/
static PyObject *
-_winapi_ConnectNamedPipe_impl(PyModuleDef *module, HANDLE handle, int use_overlapped)
-/*[clinic end generated code: output=d9a64e59c27e10f6 input=edc83da007ebf3be]*/
+_winapi_ConnectNamedPipe_impl(PyModuleDef *module, HANDLE handle,
+ int use_overlapped)
+/*[clinic end generated code: output=fed3b165d1bca95a input=edc83da007ebf3be]*/
{
BOOL success;
OverlappedObject *overlapped = NULL;
@@ -442,8 +443,12 @@ _winapi.CreateFile -> HANDLE
[clinic start generated code]*/
static HANDLE
-_winapi_CreateFile_impl(PyModuleDef *module, LPCTSTR file_name, DWORD desired_access, DWORD share_mode, LPSECURITY_ATTRIBUTES security_attributes, DWORD creation_disposition, DWORD flags_and_attributes, HANDLE template_file)
-/*[clinic end generated code: output=f8649129a4959288 input=6423c3e40372dbd5]*/
+_winapi_CreateFile_impl(PyModuleDef *module, LPCTSTR file_name,
+ DWORD desired_access, DWORD share_mode,
+ LPSECURITY_ATTRIBUTES security_attributes,
+ DWORD creation_disposition,
+ DWORD flags_and_attributes, HANDLE template_file)
+/*[clinic end generated code: output=c6e1d78f8affd10c input=6423c3e40372dbd5]*/
{
HANDLE handle;
@@ -469,8 +474,9 @@ _winapi.CreateJunction
[clinic start generated code]*/
static PyObject *
-_winapi_CreateJunction_impl(PyModuleDef *module, LPWSTR src_path, LPWSTR dst_path)
-/*[clinic end generated code: output=df22af7be7045584 input=8cd1f9964b6e3d36]*/
+_winapi_CreateJunction_impl(PyModuleDef *module, LPWSTR src_path,
+ LPWSTR dst_path)
+/*[clinic end generated code: output=eccae9364e46f6da input=8cd1f9964b6e3d36]*/
{
/* Privilege adjustment */
HANDLE token = NULL;
@@ -611,8 +617,12 @@ _winapi.CreateNamedPipe -> HANDLE
[clinic start generated code]*/
static HANDLE
-_winapi_CreateNamedPipe_impl(PyModuleDef *module, LPCTSTR name, DWORD open_mode, DWORD pipe_mode, DWORD max_instances, DWORD out_buffer_size, DWORD in_buffer_size, DWORD default_timeout, LPSECURITY_ATTRIBUTES security_attributes)
-/*[clinic end generated code: output=711e231639c25c24 input=5a73530b84d8bc37]*/
+_winapi_CreateNamedPipe_impl(PyModuleDef *module, LPCTSTR name,
+ DWORD open_mode, DWORD pipe_mode,
+ DWORD max_instances, DWORD out_buffer_size,
+ DWORD in_buffer_size, DWORD default_timeout,
+ LPSECURITY_ATTRIBUTES security_attributes)
+/*[clinic end generated code: output=44ca2a06a219b523 input=5a73530b84d8bc37]*/
{
HANDLE handle;
@@ -643,8 +653,9 @@ Returns a 2-tuple of handles, to the read and write ends of the pipe.
[clinic start generated code]*/
static PyObject *
-_winapi_CreatePipe_impl(PyModuleDef *module, PyObject *pipe_attrs, DWORD size)
-/*[clinic end generated code: output=ed09baf1d43086df input=c4f2cfa56ef68d90]*/
+_winapi_CreatePipe_impl(PyModuleDef *module, PyObject *pipe_attrs,
+ DWORD size)
+/*[clinic end generated code: output=fef99f3b4222bc78 input=c4f2cfa56ef68d90]*/
{
HANDLE read_pipe;
HANDLE write_pipe;
@@ -783,8 +794,8 @@ getenvironment(PyObject* environment)
/*[clinic input]
_winapi.CreateProcess
- application_name: Py_UNICODE(nullable=True)
- command_line: Py_UNICODE(nullable=True)
+ application_name: Py_UNICODE(accept={str, NoneType})
+ command_line: Py_UNICODE(accept={str, NoneType})
proc_attrs: object
Ignored internally, can be None.
thread_attrs: object
@@ -792,7 +803,7 @@ _winapi.CreateProcess
inherit_handles: BOOL
creation_flags: DWORD
env_mapping: object
- current_directory: Py_UNICODE(nullable=True)
+ current_directory: Py_UNICODE(accept={str, NoneType})
startup_info: object
/
@@ -803,8 +814,13 @@ process ID, and thread ID.
[clinic start generated code]*/
static PyObject *
-_winapi_CreateProcess_impl(PyModuleDef *module, Py_UNICODE *application_name, Py_UNICODE *command_line, PyObject *proc_attrs, PyObject *thread_attrs, BOOL inherit_handles, DWORD creation_flags, PyObject *env_mapping, Py_UNICODE *current_directory, PyObject *startup_info)
-/*[clinic end generated code: output=c279c1271b4c45cf input=6667ea0bc7036472]*/
+_winapi_CreateProcess_impl(PyModuleDef *module, Py_UNICODE *application_name,
+ Py_UNICODE *command_line, PyObject *proc_attrs,
+ PyObject *thread_attrs, BOOL inherit_handles,
+ DWORD creation_flags, PyObject *env_mapping,
+ Py_UNICODE *current_directory,
+ PyObject *startup_info)
+/*[clinic end generated code: output=874bb350ff9ed4ef input=4a43b05038d639bb]*/
{
BOOL result;
PROCESS_INFORMATION pi;
@@ -884,8 +900,13 @@ through both handles.
[clinic start generated code]*/
static HANDLE
-_winapi_DuplicateHandle_impl(PyModuleDef *module, HANDLE source_process_handle, HANDLE source_handle, HANDLE target_process_handle, DWORD desired_access, BOOL inherit_handle, DWORD options)
-/*[clinic end generated code: output=24a7836ca4d94aba input=b933e3f2356a8c12]*/
+_winapi_DuplicateHandle_impl(PyModuleDef *module,
+ HANDLE source_process_handle,
+ HANDLE source_handle,
+ HANDLE target_process_handle,
+ DWORD desired_access, BOOL inherit_handle,
+ DWORD options)
+/*[clinic end generated code: output=0799515b68b5237b input=b933e3f2356a8c12]*/
{
HANDLE target_handle;
BOOL result;
@@ -1074,8 +1095,9 @@ _winapi.OpenProcess -> HANDLE
[clinic start generated code]*/
static HANDLE
-_winapi_OpenProcess_impl(PyModuleDef *module, DWORD desired_access, BOOL inherit_handle, DWORD process_id)
-/*[clinic end generated code: output=2a7be5336f16f63c input=ec98c4cf4ea2ec36]*/
+_winapi_OpenProcess_impl(PyModuleDef *module, DWORD desired_access,
+ BOOL inherit_handle, DWORD process_id)
+/*[clinic end generated code: output=6bc52eda82a3d226 input=ec98c4cf4ea2ec36]*/
{
HANDLE handle;
@@ -1145,8 +1167,9 @@ _winapi.ReadFile
[clinic start generated code]*/
static PyObject *
-_winapi_ReadFile_impl(PyModuleDef *module, HANDLE handle, int size, int use_overlapped)
-/*[clinic end generated code: output=5a087be0ff44479a input=8dd810194e86ac7d]*/
+_winapi_ReadFile_impl(PyModuleDef *module, HANDLE handle, int size,
+ int use_overlapped)
+/*[clinic end generated code: output=d7695db4db97b135 input=8dd810194e86ac7d]*/
{
DWORD nread;
PyObject *buf;
@@ -1206,8 +1229,11 @@ _winapi.SetNamedPipeHandleState
[clinic start generated code]*/
static PyObject *
-_winapi_SetNamedPipeHandleState_impl(PyModuleDef *module, HANDLE named_pipe, PyObject *mode, PyObject *max_collection_count, PyObject *collect_data_timeout)
-/*[clinic end generated code: output=327efd18ff0c30ec input=9142d72163d0faa6]*/
+_winapi_SetNamedPipeHandleState_impl(PyModuleDef *module, HANDLE named_pipe,
+ PyObject *mode,
+ PyObject *max_collection_count,
+ PyObject *collect_data_timeout)
+/*[clinic end generated code: output=25aa3c28dee223ce input=9142d72163d0faa6]*/
{
PyObject *oArgs[3] = {mode, max_collection_count, collect_data_timeout};
DWORD dwArgs[3], *pArgs[3] = {NULL, NULL, NULL};
@@ -1242,8 +1268,9 @@ Terminate the specified process and all of its threads.
[clinic start generated code]*/
static PyObject *
-_winapi_TerminateProcess_impl(PyModuleDef *module, HANDLE handle, UINT exit_code)
-/*[clinic end generated code: output=1559f0f6500c2283 input=d6bc0aa1ee3bb4df]*/
+_winapi_TerminateProcess_impl(PyModuleDef *module, HANDLE handle,
+ UINT exit_code)
+/*[clinic end generated code: output=937c1bb6219aca8b input=d6bc0aa1ee3bb4df]*/
{
BOOL result;
@@ -1289,8 +1316,10 @@ _winapi.WaitForMultipleObjects
[clinic start generated code]*/
static PyObject *
-_winapi_WaitForMultipleObjects_impl(PyModuleDef *module, PyObject *handle_seq, BOOL wait_flag, DWORD milliseconds)
-/*[clinic end generated code: output=e3efee6b505dd48e input=36f76ca057cd28a0]*/
+_winapi_WaitForMultipleObjects_impl(PyModuleDef *module,
+ PyObject *handle_seq, BOOL wait_flag,
+ DWORD milliseconds)
+/*[clinic end generated code: output=acb440728d06d130 input=36f76ca057cd28a0]*/
{
DWORD result;
HANDLE handles[MAXIMUM_WAIT_OBJECTS];
@@ -1364,8 +1393,9 @@ in milliseconds.
[clinic start generated code]*/
static long
-_winapi_WaitForSingleObject_impl(PyModuleDef *module, HANDLE handle, DWORD milliseconds)
-/*[clinic end generated code: output=0c75bcc6eec6b973 input=443d1ab076edc7b1]*/
+_winapi_WaitForSingleObject_impl(PyModuleDef *module, HANDLE handle,
+ DWORD milliseconds)
+/*[clinic end generated code: output=34ae40c269749c48 input=443d1ab076edc7b1]*/
{
DWORD result;
@@ -1390,8 +1420,9 @@ _winapi.WriteFile
[clinic start generated code]*/
static PyObject *
-_winapi_WriteFile_impl(PyModuleDef *module, HANDLE handle, PyObject *buffer, int use_overlapped)
-/*[clinic end generated code: output=37bd88e293079b2c input=51846a5af52053fd]*/
+_winapi_WriteFile_impl(PyModuleDef *module, HANDLE handle, PyObject *buffer,
+ int use_overlapped)
+/*[clinic end generated code: output=65e70ea41f4d2a1d input=51846a5af52053fd]*/
{
Py_buffer _buf, *buf;
DWORD len, written;
diff --git a/Modules/clinic/_winapi.c.h b/Modules/clinic/_winapi.c.h
index c568f0f..34518e8 100644
--- a/Modules/clinic/_winapi.c.h
+++ b/Modules/clinic/_winapi.c.h
@@ -19,9 +19,7 @@ _winapi_Overlapped_GetOverlappedResult(OverlappedObject *self, PyObject *arg)
PyObject *return_value = NULL;
int wait;
- if (!PyArg_Parse(arg,
- "p:GetOverlappedResult",
- &wait))
+ if (!PyArg_Parse(arg, "p:GetOverlappedResult", &wait))
goto exit;
return_value = _winapi_Overlapped_GetOverlappedResult_impl(self, wait);
@@ -81,9 +79,7 @@ _winapi_CloseHandle(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
HANDLE handle;
- if (!PyArg_Parse(arg,
- "" F_HANDLE ":CloseHandle",
- &handle))
+ if (!PyArg_Parse(arg, "" F_HANDLE ":CloseHandle", &handle))
goto exit;
return_value = _winapi_CloseHandle_impl(module, handle);
@@ -100,7 +96,8 @@ PyDoc_STRVAR(_winapi_ConnectNamedPipe__doc__,
{"ConnectNamedPipe", (PyCFunction)_winapi_ConnectNamedPipe, METH_VARARGS|METH_KEYWORDS, _winapi_ConnectNamedPipe__doc__},
static PyObject *
-_winapi_ConnectNamedPipe_impl(PyModuleDef *module, HANDLE handle, int use_overlapped);
+_winapi_ConnectNamedPipe_impl(PyModuleDef *module, HANDLE handle,
+ int use_overlapped);
static PyObject *
_winapi_ConnectNamedPipe(PyModuleDef *module, PyObject *args, PyObject *kwargs)
@@ -110,8 +107,7 @@ _winapi_ConnectNamedPipe(PyModuleDef *module, PyObject *args, PyObject *kwargs)
HANDLE handle;
int use_overlapped = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "" F_HANDLE "|i:ConnectNamedPipe", _keywords,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "" F_HANDLE "|i:ConnectNamedPipe", _keywords,
&handle, &use_overlapped))
goto exit;
return_value = _winapi_ConnectNamedPipe_impl(module, handle, use_overlapped);
@@ -131,7 +127,11 @@ PyDoc_STRVAR(_winapi_CreateFile__doc__,
{"CreateFile", (PyCFunction)_winapi_CreateFile, METH_VARARGS, _winapi_CreateFile__doc__},
static HANDLE
-_winapi_CreateFile_impl(PyModuleDef *module, LPCTSTR file_name, DWORD desired_access, DWORD share_mode, LPSECURITY_ATTRIBUTES security_attributes, DWORD creation_disposition, DWORD flags_and_attributes, HANDLE template_file);
+_winapi_CreateFile_impl(PyModuleDef *module, LPCTSTR file_name,
+ DWORD desired_access, DWORD share_mode,
+ LPSECURITY_ATTRIBUTES security_attributes,
+ DWORD creation_disposition,
+ DWORD flags_and_attributes, HANDLE template_file);
static PyObject *
_winapi_CreateFile(PyModuleDef *module, PyObject *args)
@@ -146,8 +146,7 @@ _winapi_CreateFile(PyModuleDef *module, PyObject *args)
HANDLE template_file;
HANDLE _return_value;
- if (!PyArg_ParseTuple(args,
- "skk" F_POINTER "kk" F_HANDLE ":CreateFile",
+ if (!PyArg_ParseTuple(args, "skk" F_POINTER "kk" F_HANDLE ":CreateFile",
&file_name, &desired_access, &share_mode, &security_attributes, &creation_disposition, &flags_and_attributes, &template_file))
goto exit;
_return_value = _winapi_CreateFile_impl(module, file_name, desired_access, share_mode, security_attributes, creation_disposition, flags_and_attributes, template_file);
@@ -170,7 +169,8 @@ PyDoc_STRVAR(_winapi_CreateJunction__doc__,
{"CreateJunction", (PyCFunction)_winapi_CreateJunction, METH_VARARGS, _winapi_CreateJunction__doc__},
static PyObject *
-_winapi_CreateJunction_impl(PyModuleDef *module, LPWSTR src_path, LPWSTR dst_path);
+_winapi_CreateJunction_impl(PyModuleDef *module, LPWSTR src_path,
+ LPWSTR dst_path);
static PyObject *
_winapi_CreateJunction(PyModuleDef *module, PyObject *args)
@@ -179,8 +179,7 @@ _winapi_CreateJunction(PyModuleDef *module, PyObject *args)
LPWSTR src_path;
LPWSTR dst_path;
- if (!PyArg_ParseTuple(args,
- "uu:CreateJunction",
+ if (!PyArg_ParseTuple(args, "uu:CreateJunction",
&src_path, &dst_path))
goto exit;
return_value = _winapi_CreateJunction_impl(module, src_path, dst_path);
@@ -200,7 +199,11 @@ PyDoc_STRVAR(_winapi_CreateNamedPipe__doc__,
{"CreateNamedPipe", (PyCFunction)_winapi_CreateNamedPipe, METH_VARARGS, _winapi_CreateNamedPipe__doc__},
static HANDLE
-_winapi_CreateNamedPipe_impl(PyModuleDef *module, LPCTSTR name, DWORD open_mode, DWORD pipe_mode, DWORD max_instances, DWORD out_buffer_size, DWORD in_buffer_size, DWORD default_timeout, LPSECURITY_ATTRIBUTES security_attributes);
+_winapi_CreateNamedPipe_impl(PyModuleDef *module, LPCTSTR name,
+ DWORD open_mode, DWORD pipe_mode,
+ DWORD max_instances, DWORD out_buffer_size,
+ DWORD in_buffer_size, DWORD default_timeout,
+ LPSECURITY_ATTRIBUTES security_attributes);
static PyObject *
_winapi_CreateNamedPipe(PyModuleDef *module, PyObject *args)
@@ -216,8 +219,7 @@ _winapi_CreateNamedPipe(PyModuleDef *module, PyObject *args)
LPSECURITY_ATTRIBUTES security_attributes;
HANDLE _return_value;
- if (!PyArg_ParseTuple(args,
- "skkkkkk" F_POINTER ":CreateNamedPipe",
+ if (!PyArg_ParseTuple(args, "skkkkkk" F_POINTER ":CreateNamedPipe",
&name, &open_mode, &pipe_mode, &max_instances, &out_buffer_size, &in_buffer_size, &default_timeout, &security_attributes))
goto exit;
_return_value = _winapi_CreateNamedPipe_impl(module, name, open_mode, pipe_mode, max_instances, out_buffer_size, in_buffer_size, default_timeout, security_attributes);
@@ -246,7 +248,8 @@ PyDoc_STRVAR(_winapi_CreatePipe__doc__,
{"CreatePipe", (PyCFunction)_winapi_CreatePipe, METH_VARARGS, _winapi_CreatePipe__doc__},
static PyObject *
-_winapi_CreatePipe_impl(PyModuleDef *module, PyObject *pipe_attrs, DWORD size);
+_winapi_CreatePipe_impl(PyModuleDef *module, PyObject *pipe_attrs,
+ DWORD size);
static PyObject *
_winapi_CreatePipe(PyModuleDef *module, PyObject *args)
@@ -255,8 +258,7 @@ _winapi_CreatePipe(PyModuleDef *module, PyObject *args)
PyObject *pipe_attrs;
DWORD size;
- if (!PyArg_ParseTuple(args,
- "Ok:CreatePipe",
+ if (!PyArg_ParseTuple(args, "Ok:CreatePipe",
&pipe_attrs, &size))
goto exit;
return_value = _winapi_CreatePipe_impl(module, pipe_attrs, size);
@@ -285,7 +287,12 @@ PyDoc_STRVAR(_winapi_CreateProcess__doc__,
{"CreateProcess", (PyCFunction)_winapi_CreateProcess, METH_VARARGS, _winapi_CreateProcess__doc__},
static PyObject *
-_winapi_CreateProcess_impl(PyModuleDef *module, Py_UNICODE *application_name, Py_UNICODE *command_line, PyObject *proc_attrs, PyObject *thread_attrs, BOOL inherit_handles, DWORD creation_flags, PyObject *env_mapping, Py_UNICODE *current_directory, PyObject *startup_info);
+_winapi_CreateProcess_impl(PyModuleDef *module, Py_UNICODE *application_name,
+ Py_UNICODE *command_line, PyObject *proc_attrs,
+ PyObject *thread_attrs, BOOL inherit_handles,
+ DWORD creation_flags, PyObject *env_mapping,
+ Py_UNICODE *current_directory,
+ PyObject *startup_info);
static PyObject *
_winapi_CreateProcess(PyModuleDef *module, PyObject *args)
@@ -301,8 +308,7 @@ _winapi_CreateProcess(PyModuleDef *module, PyObject *args)
Py_UNICODE *current_directory;
PyObject *startup_info;
- if (!PyArg_ParseTuple(args,
- "ZZOOikOZO:CreateProcess",
+ if (!PyArg_ParseTuple(args, "ZZOOikOZO:CreateProcess",
&application_name, &command_line, &proc_attrs, &thread_attrs, &inherit_handles, &creation_flags, &env_mapping, &current_directory, &startup_info))
goto exit;
return_value = _winapi_CreateProcess_impl(module, application_name, command_line, proc_attrs, thread_attrs, inherit_handles, creation_flags, env_mapping, current_directory, startup_info);
@@ -327,7 +333,12 @@ PyDoc_STRVAR(_winapi_DuplicateHandle__doc__,
{"DuplicateHandle", (PyCFunction)_winapi_DuplicateHandle, METH_VARARGS, _winapi_DuplicateHandle__doc__},
static HANDLE
-_winapi_DuplicateHandle_impl(PyModuleDef *module, HANDLE source_process_handle, HANDLE source_handle, HANDLE target_process_handle, DWORD desired_access, BOOL inherit_handle, DWORD options);
+_winapi_DuplicateHandle_impl(PyModuleDef *module,
+ HANDLE source_process_handle,
+ HANDLE source_handle,
+ HANDLE target_process_handle,
+ DWORD desired_access, BOOL inherit_handle,
+ DWORD options);
static PyObject *
_winapi_DuplicateHandle(PyModuleDef *module, PyObject *args)
@@ -341,8 +352,7 @@ _winapi_DuplicateHandle(PyModuleDef *module, PyObject *args)
DWORD options = 0;
HANDLE _return_value;
- if (!PyArg_ParseTuple(args,
- "" F_HANDLE "" F_HANDLE "" F_HANDLE "ki|k:DuplicateHandle",
+ if (!PyArg_ParseTuple(args, "" F_HANDLE "" F_HANDLE "" F_HANDLE "ki|k:DuplicateHandle",
&source_process_handle, &source_handle, &target_process_handle, &desired_access, &inherit_handle, &options))
goto exit;
_return_value = _winapi_DuplicateHandle_impl(module, source_process_handle, source_handle, target_process_handle, desired_access, inherit_handle, options);
@@ -373,9 +383,7 @@ _winapi_ExitProcess(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
UINT ExitCode;
- if (!PyArg_Parse(arg,
- "I:ExitProcess",
- &ExitCode))
+ if (!PyArg_Parse(arg, "I:ExitProcess", &ExitCode))
goto exit;
return_value = _winapi_ExitProcess_impl(module, ExitCode);
@@ -431,9 +439,7 @@ _winapi_GetExitCodeProcess(PyModuleDef *module, PyObject *arg)
HANDLE process;
DWORD _return_value;
- if (!PyArg_Parse(arg,
- "" F_HANDLE ":GetExitCodeProcess",
- &process))
+ if (!PyArg_Parse(arg, "" F_HANDLE ":GetExitCodeProcess", &process))
goto exit;
_return_value = _winapi_GetExitCodeProcess_impl(module, process);
if ((_return_value == DWORD_MAX) && PyErr_Occurred())
@@ -495,9 +501,7 @@ _winapi_GetModuleFileName(PyModuleDef *module, PyObject *arg)
PyObject *return_value = NULL;
HMODULE module_handle;
- if (!PyArg_Parse(arg,
- "" F_HANDLE ":GetModuleFileName",
- &module_handle))
+ if (!PyArg_Parse(arg, "" F_HANDLE ":GetModuleFileName", &module_handle))
goto exit;
return_value = _winapi_GetModuleFileName_impl(module, module_handle);
@@ -529,9 +533,7 @@ _winapi_GetStdHandle(PyModuleDef *module, PyObject *arg)
DWORD std_handle;
HANDLE _return_value;
- if (!PyArg_Parse(arg,
- "k:GetStdHandle",
- &std_handle))
+ if (!PyArg_Parse(arg, "k:GetStdHandle", &std_handle))
goto exit;
_return_value = _winapi_GetStdHandle_impl(module, std_handle);
if ((_return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred())
@@ -580,7 +582,8 @@ PyDoc_STRVAR(_winapi_OpenProcess__doc__,
{"OpenProcess", (PyCFunction)_winapi_OpenProcess, METH_VARARGS, _winapi_OpenProcess__doc__},
static HANDLE
-_winapi_OpenProcess_impl(PyModuleDef *module, DWORD desired_access, BOOL inherit_handle, DWORD process_id);
+_winapi_OpenProcess_impl(PyModuleDef *module, DWORD desired_access,
+ BOOL inherit_handle, DWORD process_id);
static PyObject *
_winapi_OpenProcess(PyModuleDef *module, PyObject *args)
@@ -591,8 +594,7 @@ _winapi_OpenProcess(PyModuleDef *module, PyObject *args)
DWORD process_id;
HANDLE _return_value;
- if (!PyArg_ParseTuple(args,
- "kik:OpenProcess",
+ if (!PyArg_ParseTuple(args, "kik:OpenProcess",
&desired_access, &inherit_handle, &process_id))
goto exit;
_return_value = _winapi_OpenProcess_impl(module, desired_access, inherit_handle, process_id);
@@ -624,8 +626,7 @@ _winapi_PeekNamedPipe(PyModuleDef *module, PyObject *args)
HANDLE handle;
int size = 0;
- if (!PyArg_ParseTuple(args,
- "" F_HANDLE "|i:PeekNamedPipe",
+ if (!PyArg_ParseTuple(args, "" F_HANDLE "|i:PeekNamedPipe",
&handle, &size))
goto exit;
return_value = _winapi_PeekNamedPipe_impl(module, handle, size);
@@ -643,7 +644,8 @@ PyDoc_STRVAR(_winapi_ReadFile__doc__,
{"ReadFile", (PyCFunction)_winapi_ReadFile, METH_VARARGS|METH_KEYWORDS, _winapi_ReadFile__doc__},
static PyObject *
-_winapi_ReadFile_impl(PyModuleDef *module, HANDLE handle, int size, int use_overlapped);
+_winapi_ReadFile_impl(PyModuleDef *module, HANDLE handle, int size,
+ int use_overlapped);
static PyObject *
_winapi_ReadFile(PyModuleDef *module, PyObject *args, PyObject *kwargs)
@@ -654,8 +656,7 @@ _winapi_ReadFile(PyModuleDef *module, PyObject *args, PyObject *kwargs)
int size;
int use_overlapped = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "" F_HANDLE "i|i:ReadFile", _keywords,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "" F_HANDLE "i|i:ReadFile", _keywords,
&handle, &size, &use_overlapped))
goto exit;
return_value = _winapi_ReadFile_impl(module, handle, size, use_overlapped);
@@ -674,7 +675,10 @@ PyDoc_STRVAR(_winapi_SetNamedPipeHandleState__doc__,
{"SetNamedPipeHandleState", (PyCFunction)_winapi_SetNamedPipeHandleState, METH_VARARGS, _winapi_SetNamedPipeHandleState__doc__},
static PyObject *
-_winapi_SetNamedPipeHandleState_impl(PyModuleDef *module, HANDLE named_pipe, PyObject *mode, PyObject *max_collection_count, PyObject *collect_data_timeout);
+_winapi_SetNamedPipeHandleState_impl(PyModuleDef *module, HANDLE named_pipe,
+ PyObject *mode,
+ PyObject *max_collection_count,
+ PyObject *collect_data_timeout);
static PyObject *
_winapi_SetNamedPipeHandleState(PyModuleDef *module, PyObject *args)
@@ -685,8 +689,7 @@ _winapi_SetNamedPipeHandleState(PyModuleDef *module, PyObject *args)
PyObject *max_collection_count;
PyObject *collect_data_timeout;
- if (!PyArg_ParseTuple(args,
- "" F_HANDLE "OOO:SetNamedPipeHandleState",
+ if (!PyArg_ParseTuple(args, "" F_HANDLE "OOO:SetNamedPipeHandleState",
&named_pipe, &mode, &max_collection_count, &collect_data_timeout))
goto exit;
return_value = _winapi_SetNamedPipeHandleState_impl(module, named_pipe, mode, max_collection_count, collect_data_timeout);
@@ -705,7 +708,8 @@ PyDoc_STRVAR(_winapi_TerminateProcess__doc__,
{"TerminateProcess", (PyCFunction)_winapi_TerminateProcess, METH_VARARGS, _winapi_TerminateProcess__doc__},
static PyObject *
-_winapi_TerminateProcess_impl(PyModuleDef *module, HANDLE handle, UINT exit_code);
+_winapi_TerminateProcess_impl(PyModuleDef *module, HANDLE handle,
+ UINT exit_code);
static PyObject *
_winapi_TerminateProcess(PyModuleDef *module, PyObject *args)
@@ -714,8 +718,7 @@ _winapi_TerminateProcess(PyModuleDef *module, PyObject *args)
HANDLE handle;
UINT exit_code;
- if (!PyArg_ParseTuple(args,
- "" F_HANDLE "I:TerminateProcess",
+ if (!PyArg_ParseTuple(args, "" F_HANDLE "I:TerminateProcess",
&handle, &exit_code))
goto exit;
return_value = _winapi_TerminateProcess_impl(module, handle, exit_code);
@@ -742,8 +745,7 @@ _winapi_WaitNamedPipe(PyModuleDef *module, PyObject *args)
LPCTSTR name;
DWORD timeout;
- if (!PyArg_ParseTuple(args,
- "sk:WaitNamedPipe",
+ if (!PyArg_ParseTuple(args, "sk:WaitNamedPipe",
&name, &timeout))
goto exit;
return_value = _winapi_WaitNamedPipe_impl(module, name, timeout);
@@ -762,7 +764,9 @@ PyDoc_STRVAR(_winapi_WaitForMultipleObjects__doc__,
{"WaitForMultipleObjects", (PyCFunction)_winapi_WaitForMultipleObjects, METH_VARARGS, _winapi_WaitForMultipleObjects__doc__},
static PyObject *
-_winapi_WaitForMultipleObjects_impl(PyModuleDef *module, PyObject *handle_seq, BOOL wait_flag, DWORD milliseconds);
+_winapi_WaitForMultipleObjects_impl(PyModuleDef *module,
+ PyObject *handle_seq, BOOL wait_flag,
+ DWORD milliseconds);
static PyObject *
_winapi_WaitForMultipleObjects(PyModuleDef *module, PyObject *args)
@@ -772,8 +776,7 @@ _winapi_WaitForMultipleObjects(PyModuleDef *module, PyObject *args)
BOOL wait_flag;
DWORD milliseconds = INFINITE;
- if (!PyArg_ParseTuple(args,
- "Oi|k:WaitForMultipleObjects",
+ if (!PyArg_ParseTuple(args, "Oi|k:WaitForMultipleObjects",
&handle_seq, &wait_flag, &milliseconds))
goto exit;
return_value = _winapi_WaitForMultipleObjects_impl(module, handle_seq, wait_flag, milliseconds);
@@ -796,7 +799,8 @@ PyDoc_STRVAR(_winapi_WaitForSingleObject__doc__,
{"WaitForSingleObject", (PyCFunction)_winapi_WaitForSingleObject, METH_VARARGS, _winapi_WaitForSingleObject__doc__},
static long
-_winapi_WaitForSingleObject_impl(PyModuleDef *module, HANDLE handle, DWORD milliseconds);
+_winapi_WaitForSingleObject_impl(PyModuleDef *module, HANDLE handle,
+ DWORD milliseconds);
static PyObject *
_winapi_WaitForSingleObject(PyModuleDef *module, PyObject *args)
@@ -806,8 +810,7 @@ _winapi_WaitForSingleObject(PyModuleDef *module, PyObject *args)
DWORD milliseconds;
long _return_value;
- if (!PyArg_ParseTuple(args,
- "" F_HANDLE "k:WaitForSingleObject",
+ if (!PyArg_ParseTuple(args, "" F_HANDLE "k:WaitForSingleObject",
&handle, &milliseconds))
goto exit;
_return_value = _winapi_WaitForSingleObject_impl(module, handle, milliseconds);
@@ -828,7 +831,8 @@ PyDoc_STRVAR(_winapi_WriteFile__doc__,
{"WriteFile", (PyCFunction)_winapi_WriteFile, METH_VARARGS|METH_KEYWORDS, _winapi_WriteFile__doc__},
static PyObject *
-_winapi_WriteFile_impl(PyModuleDef *module, HANDLE handle, PyObject *buffer, int use_overlapped);
+_winapi_WriteFile_impl(PyModuleDef *module, HANDLE handle, PyObject *buffer,
+ int use_overlapped);
static PyObject *
_winapi_WriteFile(PyModuleDef *module, PyObject *args, PyObject *kwargs)
@@ -839,8 +843,7 @@ _winapi_WriteFile(PyModuleDef *module, PyObject *args, PyObject *kwargs)
PyObject *buffer;
int use_overlapped = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "" F_HANDLE "O|i:WriteFile", _keywords,
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "" F_HANDLE "O|i:WriteFile", _keywords,
&handle, &buffer, &use_overlapped))
goto exit;
return_value = _winapi_WriteFile_impl(module, handle, buffer, use_overlapped);
@@ -848,4 +851,4 @@ _winapi_WriteFile(PyModuleDef *module, PyObject *args, PyObject *kwargs)
exit:
return return_value;
}
-/*[clinic end generated code: output=107b73892f62ff3c input=a9049054013a1b77]*/
+/*[clinic end generated code: output=98771c6584056d19 input=a9049054013a1b77]*/