diff options
Diffstat (limited to 'PC')
-rw-r--r-- | PC/clinic/msvcrtmodule.c.h | 48 | ||||
-rw-r--r-- | PC/clinic/winreg.c.h | 105 | ||||
-rw-r--r-- | PC/clinic/winsound.c.h | 11 | ||||
-rw-r--r-- | PC/msvcrtmodule.c | 13 | ||||
-rw-r--r-- | PC/winreg.c | 74 | ||||
-rw-r--r-- | PC/winsound.c | 4 |
6 files changed, 113 insertions, 142 deletions
diff --git a/PC/clinic/msvcrtmodule.c.h b/PC/clinic/msvcrtmodule.c.h index de6fa29..51923fc 100644 --- a/PC/clinic/msvcrtmodule.c.h +++ b/PC/clinic/msvcrtmodule.c.h @@ -50,8 +50,7 @@ msvcrt_locking(PyModuleDef *module, PyObject *args) int mode; long nbytes; - if (!PyArg_ParseTuple(args, - "iil:locking", + if (!PyArg_ParseTuple(args, "iil:locking", &fd, &mode, &nbytes)) goto exit; return_value = msvcrt_locking_impl(module, fd, mode, nbytes); @@ -85,8 +84,7 @@ msvcrt_setmode(PyModuleDef *module, PyObject *args) int flags; long _return_value; - if (!PyArg_ParseTuple(args, - "ii:setmode", + if (!PyArg_ParseTuple(args, "ii:setmode", &fd, &flags)) goto exit; _return_value = msvcrt_setmode_impl(module, fd, flags); @@ -112,7 +110,8 @@ PyDoc_STRVAR(msvcrt_open_osfhandle__doc__, {"open_osfhandle", (PyCFunction)msvcrt_open_osfhandle, METH_VARARGS, msvcrt_open_osfhandle__doc__}, static long -msvcrt_open_osfhandle_impl(PyModuleDef *module, Py_intptr_t handle, int flags); +msvcrt_open_osfhandle_impl(PyModuleDef *module, Py_intptr_t handle, + int flags); static PyObject * msvcrt_open_osfhandle(PyModuleDef *module, PyObject *args) @@ -122,8 +121,7 @@ msvcrt_open_osfhandle(PyModuleDef *module, PyObject *args) int flags; long _return_value; - if (!PyArg_ParseTuple(args, - ""_Py_PARSE_INTPTR"i:open_osfhandle", + if (!PyArg_ParseTuple(args, ""_Py_PARSE_INTPTR"i:open_osfhandle", &handle, &flags)) goto exit; _return_value = msvcrt_open_osfhandle_impl(module, handle, flags); @@ -156,9 +154,7 @@ msvcrt_get_osfhandle(PyModuleDef *module, PyObject *arg) int fd; Py_intptr_t _return_value; - if (!PyArg_Parse(arg, - "i:get_osfhandle", - &fd)) + if (!PyArg_Parse(arg, "i:get_osfhandle", &fd)) goto exit; _return_value = msvcrt_get_osfhandle_impl(module, fd); if ((_return_value == -1) && PyErr_Occurred()) @@ -324,9 +320,7 @@ msvcrt_putch(PyModuleDef *module, PyObject *arg) PyObject *return_value = NULL; char char_value; - if (!PyArg_Parse(arg, - "c:putch", - &char_value)) + if (!PyArg_Parse(arg, "c:putch", &char_value)) goto exit; return_value = msvcrt_putch_impl(module, char_value); @@ -354,9 +348,7 @@ msvcrt_putwch(PyModuleDef *module, PyObject *arg) PyObject *return_value = NULL; int unicode_char; - if (!PyArg_Parse(arg, - "C:putwch", - &unicode_char)) + if (!PyArg_Parse(arg, "C:putwch", &unicode_char)) goto exit; return_value = msvcrt_putwch_impl(module, unicode_char); @@ -388,9 +380,7 @@ msvcrt_ungetch(PyModuleDef *module, PyObject *arg) PyObject *return_value = NULL; char char_value; - if (!PyArg_Parse(arg, - "c:ungetch", - &char_value)) + if (!PyArg_Parse(arg, "c:ungetch", &char_value)) goto exit; return_value = msvcrt_ungetch_impl(module, char_value); @@ -418,9 +408,7 @@ msvcrt_ungetwch(PyModuleDef *module, PyObject *arg) PyObject *return_value = NULL; int unicode_char; - if (!PyArg_Parse(arg, - "C:ungetwch", - &unicode_char)) + if (!PyArg_Parse(arg, "C:ungetwch", &unicode_char)) goto exit; return_value = msvcrt_ungetwch_impl(module, unicode_char); @@ -454,8 +442,7 @@ msvcrt_CrtSetReportFile(PyModuleDef *module, PyObject *args) int file; long _return_value; - if (!PyArg_ParseTuple(args, - "ii:CrtSetReportFile", + if (!PyArg_ParseTuple(args, "ii:CrtSetReportFile", &type, &file)) goto exit; _return_value = msvcrt_CrtSetReportFile_impl(module, type, file); @@ -493,8 +480,7 @@ msvcrt_CrtSetReportMode(PyModuleDef *module, PyObject *args) int mode; long _return_value; - if (!PyArg_ParseTuple(args, - "ii:CrtSetReportMode", + if (!PyArg_ParseTuple(args, "ii:CrtSetReportMode", &type, &mode)) goto exit; _return_value = msvcrt_CrtSetReportMode_impl(module, type, mode); @@ -531,9 +517,7 @@ msvcrt_set_error_mode(PyModuleDef *module, PyObject *arg) int mode; long _return_value; - if (!PyArg_Parse(arg, - "i:set_error_mode", - &mode)) + if (!PyArg_Parse(arg, "i:set_error_mode", &mode)) goto exit; _return_value = msvcrt_set_error_mode_impl(module, mode); if ((_return_value == -1) && PyErr_Occurred()) @@ -564,9 +548,7 @@ msvcrt_SetErrorMode(PyModuleDef *module, PyObject *arg) PyObject *return_value = NULL; unsigned int mode; - if (!PyArg_Parse(arg, - "I:SetErrorMode", - &mode)) + if (!PyArg_Parse(arg, "I:SetErrorMode", &mode)) goto exit; return_value = msvcrt_SetErrorMode_impl(module, mode); @@ -601,4 +583,4 @@ exit: #ifndef MSVCRT_SET_ERROR_MODE_METHODDEF #define MSVCRT_SET_ERROR_MODE_METHODDEF #endif /* !defined(MSVCRT_SET_ERROR_MODE_METHODDEF) */ -/*[clinic end generated code: output=41dfb6ca722afa4f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=72468bb32006a11b input=a9049054013a1b77]*/ diff --git a/PC/clinic/winreg.c.h b/PC/clinic/winreg.c.h index 6aff424b8..22b332f 100644 --- a/PC/clinic/winreg.c.h +++ b/PC/clinic/winreg.c.h @@ -80,7 +80,8 @@ PyDoc_STRVAR(winreg_HKEYType___exit____doc__, {"__exit__", (PyCFunction)winreg_HKEYType___exit__, METH_VARARGS|METH_KEYWORDS, winreg_HKEYType___exit____doc__}, static PyObject * -winreg_HKEYType___exit___impl(PyHKEYObject *self, PyObject *exc_type, PyObject *exc_value, PyObject *traceback); +winreg_HKEYType___exit___impl(PyHKEYObject *self, PyObject *exc_type, + PyObject *exc_value, PyObject *traceback); static PyObject * winreg_HKEYType___exit__(PyHKEYObject *self, PyObject *args, PyObject *kwargs) @@ -91,8 +92,7 @@ winreg_HKEYType___exit__(PyHKEYObject *self, PyObject *args, PyObject *kwargs) PyObject *exc_value; PyObject *traceback; - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OOO:__exit__", _keywords, + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:__exit__", _keywords, &exc_type, &exc_value, &traceback)) goto exit; return_value = winreg_HKEYType___exit___impl(self, exc_type, exc_value, traceback); @@ -135,7 +135,8 @@ PyDoc_STRVAR(winreg_ConnectRegistry__doc__, {"ConnectRegistry", (PyCFunction)winreg_ConnectRegistry, METH_VARARGS, winreg_ConnectRegistry__doc__}, static HKEY -winreg_ConnectRegistry_impl(PyModuleDef *module, Py_UNICODE *computer_name, HKEY key); +winreg_ConnectRegistry_impl(PyModuleDef *module, Py_UNICODE *computer_name, + HKEY key); static PyObject * winreg_ConnectRegistry(PyModuleDef *module, PyObject *args) @@ -145,8 +146,7 @@ winreg_ConnectRegistry(PyModuleDef *module, PyObject *args) HKEY key; HKEY _return_value; - if (!PyArg_ParseTuple(args, - "ZO&:ConnectRegistry", + if (!PyArg_ParseTuple(args, "ZO&:ConnectRegistry", &computer_name, clinic_HKEY_converter, &key)) goto exit; _return_value = winreg_ConnectRegistry_impl(module, computer_name, key); @@ -191,8 +191,7 @@ winreg_CreateKey(PyModuleDef *module, PyObject *args) Py_UNICODE *sub_key; HKEY _return_value; - if (!PyArg_ParseTuple(args, - "O&Z:CreateKey", + if (!PyArg_ParseTuple(args, "O&Z:CreateKey", clinic_HKEY_converter, &key, &sub_key)) goto exit; _return_value = winreg_CreateKey_impl(module, key, sub_key); @@ -233,7 +232,8 @@ PyDoc_STRVAR(winreg_CreateKeyEx__doc__, {"CreateKeyEx", (PyCFunction)winreg_CreateKeyEx, METH_VARARGS|METH_KEYWORDS, winreg_CreateKeyEx__doc__}, static HKEY -winreg_CreateKeyEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, int reserved, REGSAM access); +winreg_CreateKeyEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, + int reserved, REGSAM access); static PyObject * winreg_CreateKeyEx(PyModuleDef *module, PyObject *args, PyObject *kwargs) @@ -246,8 +246,7 @@ winreg_CreateKeyEx(PyModuleDef *module, PyObject *args, PyObject *kwargs) REGSAM access = KEY_WRITE; HKEY _return_value; - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O&Z|ii:CreateKeyEx", _keywords, + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&Z|ii:CreateKeyEx", _keywords, clinic_HKEY_converter, &key, &sub_key, &reserved, &access)) goto exit; _return_value = winreg_CreateKeyEx_impl(module, key, sub_key, reserved, access); @@ -290,8 +289,7 @@ winreg_DeleteKey(PyModuleDef *module, PyObject *args) HKEY key; Py_UNICODE *sub_key; - if (!PyArg_ParseTuple(args, - "O&u:DeleteKey", + if (!PyArg_ParseTuple(args, "O&u:DeleteKey", clinic_HKEY_converter, &key, &sub_key)) goto exit; return_value = winreg_DeleteKey_impl(module, key, sub_key); @@ -329,7 +327,8 @@ PyDoc_STRVAR(winreg_DeleteKeyEx__doc__, {"DeleteKeyEx", (PyCFunction)winreg_DeleteKeyEx, METH_VARARGS|METH_KEYWORDS, winreg_DeleteKeyEx__doc__}, static PyObject * -winreg_DeleteKeyEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, REGSAM access, int reserved); +winreg_DeleteKeyEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, + REGSAM access, int reserved); static PyObject * winreg_DeleteKeyEx(PyModuleDef *module, PyObject *args, PyObject *kwargs) @@ -341,8 +340,7 @@ winreg_DeleteKeyEx(PyModuleDef *module, PyObject *args, PyObject *kwargs) REGSAM access = KEY_WOW64_64KEY; int reserved = 0; - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O&u|ii:DeleteKeyEx", _keywords, + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&u|ii:DeleteKeyEx", _keywords, clinic_HKEY_converter, &key, &sub_key, &access, &reserved)) goto exit; return_value = winreg_DeleteKeyEx_impl(module, key, sub_key, access, reserved); @@ -375,8 +373,7 @@ winreg_DeleteValue(PyModuleDef *module, PyObject *args) HKEY key; Py_UNICODE *value; - if (!PyArg_ParseTuple(args, - "O&Z:DeleteValue", + if (!PyArg_ParseTuple(args, "O&Z:DeleteValue", clinic_HKEY_converter, &key, &value)) goto exit; return_value = winreg_DeleteValue_impl(module, key, value); @@ -413,8 +410,7 @@ winreg_EnumKey(PyModuleDef *module, PyObject *args) HKEY key; int index; - if (!PyArg_ParseTuple(args, - "O&i:EnumKey", + if (!PyArg_ParseTuple(args, "O&i:EnumKey", clinic_HKEY_converter, &key, &index)) goto exit; return_value = winreg_EnumKey_impl(module, key, index); @@ -460,8 +456,7 @@ winreg_EnumValue(PyModuleDef *module, PyObject *args) HKEY key; int index; - if (!PyArg_ParseTuple(args, - "O&i:EnumValue", + if (!PyArg_ParseTuple(args, "O&i:EnumValue", clinic_HKEY_converter, &key, &index)) goto exit; return_value = winreg_EnumValue_impl(module, key, index); @@ -488,9 +483,7 @@ winreg_ExpandEnvironmentStrings(PyModuleDef *module, PyObject *arg) PyObject *return_value = NULL; Py_UNICODE *string; - if (!PyArg_Parse(arg, - "u:ExpandEnvironmentStrings", - &string)) + if (!PyArg_Parse(arg, "u:ExpandEnvironmentStrings", &string)) goto exit; return_value = winreg_ExpandEnvironmentStrings_impl(module, string); @@ -529,9 +522,7 @@ winreg_FlushKey(PyModuleDef *module, PyObject *arg) PyObject *return_value = NULL; HKEY key; - if (!PyArg_Parse(arg, - "O&:FlushKey", - clinic_HKEY_converter, &key)) + if (!PyArg_Parse(arg, "O&:FlushKey", clinic_HKEY_converter, &key)) goto exit; return_value = winreg_FlushKey_impl(module, key); @@ -571,7 +562,8 @@ PyDoc_STRVAR(winreg_LoadKey__doc__, {"LoadKey", (PyCFunction)winreg_LoadKey, METH_VARARGS, winreg_LoadKey__doc__}, static PyObject * -winreg_LoadKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, Py_UNICODE *file_name); +winreg_LoadKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, + Py_UNICODE *file_name); static PyObject * winreg_LoadKey(PyModuleDef *module, PyObject *args) @@ -581,8 +573,7 @@ winreg_LoadKey(PyModuleDef *module, PyObject *args) Py_UNICODE *sub_key; Py_UNICODE *file_name; - if (!PyArg_ParseTuple(args, - "O&uu:LoadKey", + if (!PyArg_ParseTuple(args, "O&uu:LoadKey", clinic_HKEY_converter, &key, &sub_key, &file_name)) goto exit; return_value = winreg_LoadKey_impl(module, key, sub_key, file_name); @@ -614,7 +605,8 @@ PyDoc_STRVAR(winreg_OpenKey__doc__, {"OpenKey", (PyCFunction)winreg_OpenKey, METH_VARARGS|METH_KEYWORDS, winreg_OpenKey__doc__}, static HKEY -winreg_OpenKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, int reserved, REGSAM access); +winreg_OpenKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, + int reserved, REGSAM access); static PyObject * winreg_OpenKey(PyModuleDef *module, PyObject *args, PyObject *kwargs) @@ -627,8 +619,7 @@ winreg_OpenKey(PyModuleDef *module, PyObject *args, PyObject *kwargs) REGSAM access = KEY_READ; HKEY _return_value; - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O&Z|ii:OpenKey", _keywords, + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&Z|ii:OpenKey", _keywords, clinic_HKEY_converter, &key, &sub_key, &reserved, &access)) goto exit; _return_value = winreg_OpenKey_impl(module, key, sub_key, reserved, access); @@ -663,7 +654,8 @@ PyDoc_STRVAR(winreg_OpenKeyEx__doc__, {"OpenKeyEx", (PyCFunction)winreg_OpenKeyEx, METH_VARARGS|METH_KEYWORDS, winreg_OpenKeyEx__doc__}, static HKEY -winreg_OpenKeyEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, int reserved, REGSAM access); +winreg_OpenKeyEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, + int reserved, REGSAM access); static PyObject * winreg_OpenKeyEx(PyModuleDef *module, PyObject *args, PyObject *kwargs) @@ -676,8 +668,7 @@ winreg_OpenKeyEx(PyModuleDef *module, PyObject *args, PyObject *kwargs) REGSAM access = KEY_READ; HKEY _return_value; - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O&Z|ii:OpenKeyEx", _keywords, + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&Z|ii:OpenKeyEx", _keywords, clinic_HKEY_converter, &key, &sub_key, &reserved, &access)) goto exit; _return_value = winreg_OpenKeyEx_impl(module, key, sub_key, reserved, access); @@ -716,9 +707,7 @@ winreg_QueryInfoKey(PyModuleDef *module, PyObject *arg) PyObject *return_value = NULL; HKEY key; - if (!PyArg_Parse(arg, - "O&:QueryInfoKey", - clinic_HKEY_converter, &key)) + if (!PyArg_Parse(arg, "O&:QueryInfoKey", clinic_HKEY_converter, &key)) goto exit; return_value = winreg_QueryInfoKey_impl(module, key); @@ -759,8 +748,7 @@ winreg_QueryValue(PyModuleDef *module, PyObject *args) HKEY key; Py_UNICODE *sub_key; - if (!PyArg_ParseTuple(args, - "O&Z:QueryValue", + if (!PyArg_ParseTuple(args, "O&Z:QueryValue", clinic_HKEY_converter, &key, &sub_key)) goto exit; return_value = winreg_QueryValue_impl(module, key, sub_key); @@ -798,8 +786,7 @@ winreg_QueryValueEx(PyModuleDef *module, PyObject *args) HKEY key; Py_UNICODE *name; - if (!PyArg_ParseTuple(args, - "O&Z:QueryValueEx", + if (!PyArg_ParseTuple(args, "O&Z:QueryValueEx", clinic_HKEY_converter, &key, &name)) goto exit; return_value = winreg_QueryValueEx_impl(module, key, name); @@ -842,8 +829,7 @@ winreg_SaveKey(PyModuleDef *module, PyObject *args) HKEY key; Py_UNICODE *file_name; - if (!PyArg_ParseTuple(args, - "O&u:SaveKey", + if (!PyArg_ParseTuple(args, "O&u:SaveKey", clinic_HKEY_converter, &key, &file_name)) goto exit; return_value = winreg_SaveKey_impl(module, key, file_name); @@ -882,7 +868,9 @@ PyDoc_STRVAR(winreg_SetValue__doc__, {"SetValue", (PyCFunction)winreg_SetValue, METH_VARARGS, winreg_SetValue__doc__}, static PyObject * -winreg_SetValue_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, DWORD type, Py_UNICODE *value, Py_ssize_clean_t value_length); +winreg_SetValue_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, + DWORD type, Py_UNICODE *value, + Py_ssize_clean_t value_length); static PyObject * winreg_SetValue(PyModuleDef *module, PyObject *args) @@ -894,8 +882,7 @@ winreg_SetValue(PyModuleDef *module, PyObject *args) Py_UNICODE *value; Py_ssize_clean_t value_length; - if (!PyArg_ParseTuple(args, - "O&Zku#:SetValue", + if (!PyArg_ParseTuple(args, "O&Zku#:SetValue", clinic_HKEY_converter, &key, &sub_key, &type, &value, &value_length)) goto exit; return_value = winreg_SetValue_impl(module, key, sub_key, type, value, value_length); @@ -949,7 +936,8 @@ PyDoc_STRVAR(winreg_SetValueEx__doc__, {"SetValueEx", (PyCFunction)winreg_SetValueEx, METH_VARARGS, winreg_SetValueEx__doc__}, static PyObject * -winreg_SetValueEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *value_name, PyObject *reserved, DWORD type, PyObject *value); +winreg_SetValueEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *value_name, + PyObject *reserved, DWORD type, PyObject *value); static PyObject * winreg_SetValueEx(PyModuleDef *module, PyObject *args) @@ -961,8 +949,7 @@ winreg_SetValueEx(PyModuleDef *module, PyObject *args) DWORD type; PyObject *value; - if (!PyArg_ParseTuple(args, - "O&ZOkO:SetValueEx", + if (!PyArg_ParseTuple(args, "O&ZOkO:SetValueEx", clinic_HKEY_converter, &key, &value_name, &reserved, &type, &value)) goto exit; return_value = winreg_SetValueEx_impl(module, key, value_name, reserved, type, value); @@ -998,9 +985,7 @@ winreg_DisableReflectionKey(PyModuleDef *module, PyObject *arg) PyObject *return_value = NULL; HKEY key; - if (!PyArg_Parse(arg, - "O&:DisableReflectionKey", - clinic_HKEY_converter, &key)) + if (!PyArg_Parse(arg, "O&:DisableReflectionKey", clinic_HKEY_converter, &key)) goto exit; return_value = winreg_DisableReflectionKey_impl(module, key); @@ -1033,9 +1018,7 @@ winreg_EnableReflectionKey(PyModuleDef *module, PyObject *arg) PyObject *return_value = NULL; HKEY key; - if (!PyArg_Parse(arg, - "O&:EnableReflectionKey", - clinic_HKEY_converter, &key)) + if (!PyArg_Parse(arg, "O&:EnableReflectionKey", clinic_HKEY_converter, &key)) goto exit; return_value = winreg_EnableReflectionKey_impl(module, key); @@ -1066,13 +1049,11 @@ winreg_QueryReflectionKey(PyModuleDef *module, PyObject *arg) PyObject *return_value = NULL; HKEY key; - if (!PyArg_Parse(arg, - "O&:QueryReflectionKey", - clinic_HKEY_converter, &key)) + if (!PyArg_Parse(arg, "O&:QueryReflectionKey", clinic_HKEY_converter, &key)) goto exit; return_value = winreg_QueryReflectionKey_impl(module, key); exit: return return_value; } -/*[clinic end generated code: output=be6e50b901570878 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=71f5bc30b646807b input=a9049054013a1b77]*/ diff --git a/PC/clinic/winsound.c.h b/PC/clinic/winsound.c.h index 065ed62..dca5a42 100644 --- a/PC/clinic/winsound.c.h +++ b/PC/clinic/winsound.c.h @@ -26,8 +26,7 @@ winsound_PlaySound(PyModuleDef *module, PyObject *args) Py_UNICODE *sound; int flags; - if (!PyArg_ParseTuple(args, - "Zi:PlaySound", + if (!PyArg_ParseTuple(args, "Zi:PlaySound", &sound, &flags)) goto exit; return_value = winsound_PlaySound_impl(module, sound, flags); @@ -61,8 +60,7 @@ winsound_Beep(PyModuleDef *module, PyObject *args) int frequency; int duration; - if (!PyArg_ParseTuple(args, - "ii:Beep", + if (!PyArg_ParseTuple(args, "ii:Beep", &frequency, &duration)) goto exit; return_value = winsound_Beep_impl(module, frequency, duration); @@ -91,8 +89,7 @@ winsound_MessageBeep(PyModuleDef *module, PyObject *args) PyObject *return_value = NULL; int x = MB_OK; - if (!PyArg_ParseTuple(args, - "|i:MessageBeep", + if (!PyArg_ParseTuple(args, "|i:MessageBeep", &x)) goto exit; return_value = winsound_MessageBeep_impl(module, x); @@ -100,4 +97,4 @@ winsound_MessageBeep(PyModuleDef *module, PyObject *args) exit: return return_value; } -/*[clinic end generated code: output=89c85ed36c3af2fd input=a9049054013a1b77]*/ +/*[clinic end generated code: output=c5b018ac9dc1f500 input=a9049054013a1b77]*/ diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c index 0779ac7..6f2eff6 100644 --- a/PC/msvcrtmodule.c +++ b/PC/msvcrtmodule.c @@ -160,8 +160,9 @@ to os.fdopen() to create a file object. [clinic start generated code]*/ static long -msvcrt_open_osfhandle_impl(PyModuleDef *module, Py_intptr_t handle, int flags) -/*[clinic end generated code: output=8cda35b8e4ea4178 input=4d8516ed32db8f65]*/ +msvcrt_open_osfhandle_impl(PyModuleDef *module, Py_intptr_t handle, + int flags) +/*[clinic end generated code: output=86bce32582c49c06 input=4d8516ed32db8f65]*/ { int fd; @@ -320,7 +321,7 @@ msvcrt_putch_impl(PyModuleDef *module, char char_value) /*[clinic input] msvcrt.putwch - unicode_char: int(types='str') + unicode_char: int(accept={str}) / Wide char variant of putch(), accepting a Unicode value. @@ -328,7 +329,7 @@ Wide char variant of putch(), accepting a Unicode value. static PyObject * msvcrt_putwch_impl(PyModuleDef *module, int unicode_char) -/*[clinic end generated code: output=c216a73694ca73dd input=74377c932af728a4]*/ +/*[clinic end generated code: output=c216a73694ca73dd input=996ccd0bbcbac4c3]*/ { _putwch(unicode_char); Py_RETURN_NONE; @@ -362,7 +363,7 @@ msvcrt_ungetch_impl(PyModuleDef *module, char char_value) /*[clinic input] msvcrt.ungetwch - unicode_char: int(types='str') + unicode_char: int(accept={str}) / Wide char variant of ungetch(), accepting a Unicode value. @@ -370,7 +371,7 @@ Wide char variant of ungetch(), accepting a Unicode value. static PyObject * msvcrt_ungetwch_impl(PyModuleDef *module, int unicode_char) -/*[clinic end generated code: output=1ee7674710322bd1 input=6bcd16276e035902]*/ +/*[clinic end generated code: output=1ee7674710322bd1 input=83ec0492be04d564]*/ { if (_ungetwch(unicode_char) == WEOF) return PyErr_SetFromErrno(PyExc_IOError); diff --git a/PC/winreg.c b/PC/winreg.c index 605c234..3313202 100644 --- a/PC/winreg.c +++ b/PC/winreg.c @@ -319,8 +319,9 @@ winreg.HKEYType.__exit__ [clinic start generated code]*/ static PyObject * -winreg_HKEYType___exit___impl(PyHKEYObject *self, PyObject *exc_type, PyObject *exc_value, PyObject *traceback) -/*[clinic end generated code: output=51adcc1522e9c847 input=fb32489ee92403c7]*/ +winreg_HKEYType___exit___impl(PyHKEYObject *self, PyObject *exc_type, + PyObject *exc_value, PyObject *traceback) +/*[clinic end generated code: output=923ebe7389e6a263 input=fb32489ee92403c7]*/ { if (!PyHKEY_Close((PyObject *)self)) return NULL; @@ -784,7 +785,7 @@ winreg_CloseKey(PyModuleDef *module, PyObject *hkey) /*[clinic input] winreg.ConnectRegistry -> HKEY - computer_name: Py_UNICODE(nullable=True) + computer_name: Py_UNICODE(accept={str, NoneType}) The name of the remote computer, of the form r"\\computername". If None, the local computer is used. key: HKEY @@ -798,8 +799,9 @@ If the function fails, an OSError exception is raised. [clinic start generated code]*/ static HKEY -winreg_ConnectRegistry_impl(PyModuleDef *module, Py_UNICODE *computer_name, HKEY key) -/*[clinic end generated code: output=bce735a41d767290 input=dcea2c433af51576]*/ +winreg_ConnectRegistry_impl(PyModuleDef *module, Py_UNICODE *computer_name, + HKEY key) +/*[clinic end generated code: output=5c52f6f7ba6e7b46 input=9a056558ce318433]*/ { HKEY retKey; long rc; @@ -818,7 +820,7 @@ winreg.CreateKey -> HKEY key: HKEY An already open key, or one of the predefined HKEY_* constants. - sub_key: Py_UNICODE(nullable=True) + sub_key: Py_UNICODE(accept={str, NoneType}) The name of the key this method opens or creates. / @@ -835,7 +837,7 @@ If the function fails, an OSError exception is raised. static HKEY winreg_CreateKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key) -/*[clinic end generated code: output=cd6843f30a73fc0e input=8014b171a5682fe7]*/ +/*[clinic end generated code: output=cd6843f30a73fc0e input=3cdd1622488acea2]*/ { HKEY retKey; long rc; @@ -853,7 +855,7 @@ winreg.CreateKeyEx -> HKEY key: HKEY An already open key, or one of the predefined HKEY_* constants. - sub_key: Py_UNICODE(nullable=True) + sub_key: Py_UNICODE(accept={str, NoneType}) The name of the key this method opens or creates. reserved: int = 0 A reserved integer, and must be zero. Default is zero. @@ -873,8 +875,9 @@ If the function fails, an OSError exception is raised. [clinic start generated code]*/ static HKEY -winreg_CreateKeyEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, int reserved, REGSAM access) -/*[clinic end generated code: output=543d176b19183749 input=4322acd5c7f2e787]*/ +winreg_CreateKeyEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, + int reserved, REGSAM access) +/*[clinic end generated code: output=db835d5be84e72b2 input=42c2b03f98406b66]*/ { HKEY retKey; long rc; @@ -942,8 +945,9 @@ On unsupported Windows versions, NotImplementedError is raised. [clinic start generated code]*/ static PyObject * -winreg_DeleteKeyEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, REGSAM access, int reserved) -/*[clinic end generated code: output=8b8a20684a59a902 input=711d9d89e7ecbed7]*/ +winreg_DeleteKeyEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, + REGSAM access, int reserved) +/*[clinic end generated code: output=0362a0ac6502379f input=711d9d89e7ecbed7]*/ { HMODULE hMod; typedef LONG (WINAPI *RDKEFunc)(HKEY, const wchar_t*, REGSAM, int); @@ -975,7 +979,7 @@ winreg.DeleteValue key: HKEY An already open key, or any one of the predefined HKEY_* constants. - value: Py_UNICODE(nullable=True) + value: Py_UNICODE(accept={str, NoneType}) A string that identifies the value to remove. / @@ -984,7 +988,7 @@ Removes a named value from a registry key. static PyObject * winreg_DeleteValue_impl(PyModuleDef *module, HKEY key, Py_UNICODE *value) -/*[clinic end generated code: output=308550b8cdcfd8e1 input=417a5c1005cbbddc]*/ +/*[clinic end generated code: output=308550b8cdcfd8e1 input=a78d3407a4197b21]*/ { long rc; Py_BEGIN_ALLOW_THREADS @@ -1244,8 +1248,9 @@ tree. [clinic start generated code]*/ static PyObject * -winreg_LoadKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, Py_UNICODE *file_name) -/*[clinic end generated code: output=53b22607f8e73d34 input=e3b5b45ade311582]*/ +winreg_LoadKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, + Py_UNICODE *file_name) +/*[clinic end generated code: output=b8b700e39c695b90 input=e3b5b45ade311582]*/ { long rc; @@ -1262,7 +1267,7 @@ winreg.OpenKey -> HKEY key: HKEY An already open key, or any one of the predefined HKEY_* constants. - sub_key: Py_UNICODE(nullable=True) + sub_key: Py_UNICODE(accept={str, NoneType}) A string that identifies the sub_key to open. reserved: int = 0 A reserved integer that must be zero. Default is zero. @@ -1277,8 +1282,9 @@ If the function fails, an OSError exception is raised. [clinic start generated code]*/ static HKEY -winreg_OpenKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, int reserved, REGSAM access) -/*[clinic end generated code: output=8bf50881521469c6 input=dc84a4af4af4d387]*/ +winreg_OpenKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, + int reserved, REGSAM access) +/*[clinic end generated code: output=79818ea356490a55 input=098505ac36a9ae28]*/ { HKEY retKey; long rc; @@ -1303,8 +1309,9 @@ If the function fails, an OSError exception is raised. [clinic start generated code]*/ static HKEY -winreg_OpenKeyEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, int reserved, REGSAM access) -/*[clinic end generated code: output=f6f7cd4befb9585b input=c6c4972af8622959]*/ +winreg_OpenKeyEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, + int reserved, REGSAM access) +/*[clinic end generated code: output=2dd9f29e84ea2dbc input=c6c4972af8622959]*/ { return winreg_OpenKey_impl(module, key, sub_key, reserved, access); } @@ -1355,7 +1362,7 @@ winreg.QueryValue key: HKEY An already open key, or any one of the predefined HKEY_* constants. - sub_key: Py_UNICODE(nullable=True) + sub_key: Py_UNICODE(accept={str, NoneType}) A string that holds the name of the subkey with which the value is associated. If this parameter is None or empty, the function retrieves the value set by the SetValue() method for the key @@ -1373,7 +1380,7 @@ completeness. static PyObject * winreg_QueryValue_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key) -/*[clinic end generated code: output=f91cb6f623c3b65a input=e6ec57bb8d39aaa6]*/ +/*[clinic end generated code: output=f91cb6f623c3b65a input=41cafbbf423b21d6]*/ { long rc; PyObject *retStr; @@ -1426,7 +1433,7 @@ winreg.QueryValueEx key: HKEY An already open key, or any one of the predefined HKEY_* constants. - name: Py_UNICODE(nullable=True) + name: Py_UNICODE(accept={str, NoneType}) A string indicating the value to query. / @@ -1440,7 +1447,7 @@ The return value is a tuple of the value and the type_id. static PyObject * winreg_QueryValueEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *name) -/*[clinic end generated code: output=a4b07f7807194f23 input=4403ae868b44e563]*/ +/*[clinic end generated code: output=a4b07f7807194f23 input=cf366cada4836891]*/ { long rc; BYTE *retBuf, *tmp; @@ -1535,12 +1542,12 @@ winreg.SetValue key: HKEY An already open key, or any one of the predefined HKEY_* constants. - sub_key: Py_UNICODE(nullable=True) + sub_key: Py_UNICODE(accept={str, NoneType}) A string that names the subkey with which the value is associated. type: DWORD An integer that specifies the type of the data. Currently this must be REG_SZ, meaning only strings are supported. - value: Py_UNICODE(length=True) + value: Py_UNICODE(zeroes=True) A string that specifies the new value. / @@ -1558,8 +1565,10 @@ KEY_SET_VALUE access. [clinic start generated code]*/ static PyObject * -winreg_SetValue_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, DWORD type, Py_UNICODE *value, Py_ssize_clean_t value_length) -/*[clinic end generated code: output=807274a1c01961b5 input=83ad2fae2ffbb941]*/ +winreg_SetValue_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key, + DWORD type, Py_UNICODE *value, + Py_ssize_clean_t value_length) +/*[clinic end generated code: output=3c9c7c2769e8f953 input=2cd2adab79339c53]*/ { long rc; @@ -1582,7 +1591,7 @@ winreg.SetValueEx key: HKEY An already open key, or any one of the predefined HKEY_* constants. - value_name: Py_UNICODE(nullable=True) + value_name: Py_UNICODE(accept={str, NoneType}) A string containing the name of the value to set, or None. reserved: object Can be anything - zero is always passed to the API. @@ -1620,8 +1629,9 @@ the configuration registry to help the registry perform efficiently. [clinic start generated code]*/ static PyObject * -winreg_SetValueEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *value_name, PyObject *reserved, DWORD type, PyObject *value) -/*[clinic end generated code: output=a53ac3aecef9b977 input=8fe45d7ac381cf96]*/ +winreg_SetValueEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *value_name, + PyObject *reserved, DWORD type, PyObject *value) +/*[clinic end generated code: output=ea092a935c361582 input=e73dec535ebeea7d]*/ { BYTE *data; DWORD len; diff --git a/PC/winsound.c b/PC/winsound.c index a659861..8e77d13 100644 --- a/PC/winsound.c +++ b/PC/winsound.c @@ -64,7 +64,7 @@ module winsound /*[clinic input] winsound.PlaySound - sound: Py_UNICODE(nullable=True) + sound: Py_UNICODE(accept={str, NoneType}) The sound to play; a filename, data, or None. flags: int Flag values, ored together. See module documentation. @@ -75,7 +75,7 @@ A wrapper around the Windows PlaySound API. static PyObject * winsound_PlaySound_impl(PyModuleDef *module, Py_UNICODE *sound, int flags) -/*[clinic end generated code: output=614273784bf59e5c input=c86fab5d8e86f31d]*/ +/*[clinic end generated code: output=614273784bf59e5c input=3411b1b7c1f36d93]*/ { int ok; |