summaryrefslogtreecommitdiff
path: root/PC
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-07-07 17:35:15 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2016-07-07 17:35:15 +0300
commit1a2b24f02dfd4eb3383f6ae2b59e5a4eb66fd5bb (patch)
treed0bac08478e97df6c9f949e0f9622a67d4d15d96 /PC
parentassume egd unless OPENSSL_NO_EGD is defined—remove configure check (closes ... (diff)
downloadcpython-1a2b24f02dfd4eb3383f6ae2b59e5a4eb66fd5bb.tar.gz
cpython-1a2b24f02dfd4eb3383f6ae2b59e5a4eb66fd5bb.tar.bz2
cpython-1a2b24f02dfd4eb3383f6ae2b59e5a4eb66fd5bb.zip
Issue #27332: Fixed the type of the first argument of module-level functions
generated by Argument Clinic. Patch by Petr Viktorin.
Diffstat (limited to 'PC')
-rw-r--r--PC/clinic/msvcrtmodule.c.h75
-rw-r--r--PC/clinic/winreg.c.h90
-rw-r--r--PC/clinic/winsound.c.h14
-rw-r--r--PC/msvcrtmodule.c73
-rw-r--r--PC/winreg.c92
-rw-r--r--PC/winsound.c12
6 files changed, 177 insertions, 179 deletions
diff --git a/PC/clinic/msvcrtmodule.c.h b/PC/clinic/msvcrtmodule.c.h
index c8e6ed8533f..e7a72c47f6d 100644
--- a/PC/clinic/msvcrtmodule.c.h
+++ b/PC/clinic/msvcrtmodule.c.h
@@ -15,10 +15,10 @@ PyDoc_STRVAR(msvcrt_heapmin__doc__,
{"heapmin", (PyCFunction)msvcrt_heapmin, METH_NOARGS, msvcrt_heapmin__doc__},
static PyObject *
-msvcrt_heapmin_impl(PyModuleDef *module);
+msvcrt_heapmin_impl(PyObject *module);
static PyObject *
-msvcrt_heapmin(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+msvcrt_heapmin(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return msvcrt_heapmin_impl(module);
}
@@ -40,10 +40,10 @@ PyDoc_STRVAR(msvcrt_locking__doc__,
{"locking", (PyCFunction)msvcrt_locking, METH_VARARGS, msvcrt_locking__doc__},
static PyObject *
-msvcrt_locking_impl(PyModuleDef *module, int fd, int mode, long nbytes);
+msvcrt_locking_impl(PyObject *module, int fd, int mode, long nbytes);
static PyObject *
-msvcrt_locking(PyModuleDef *module, PyObject *args)
+msvcrt_locking(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
int fd;
@@ -74,10 +74,10 @@ PyDoc_STRVAR(msvcrt_setmode__doc__,
{"setmode", (PyCFunction)msvcrt_setmode, METH_VARARGS, msvcrt_setmode__doc__},
static long
-msvcrt_setmode_impl(PyModuleDef *module, int fd, int flags);
+msvcrt_setmode_impl(PyObject *module, int fd, int flags);
static PyObject *
-msvcrt_setmode(PyModuleDef *module, PyObject *args)
+msvcrt_setmode(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
int fd;
@@ -110,11 +110,10 @@ 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(PyObject *module, Py_intptr_t handle, int flags);
static PyObject *
-msvcrt_open_osfhandle(PyModuleDef *module, PyObject *args)
+msvcrt_open_osfhandle(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
Py_intptr_t handle;
@@ -145,10 +144,10 @@ PyDoc_STRVAR(msvcrt_get_osfhandle__doc__,
{"get_osfhandle", (PyCFunction)msvcrt_get_osfhandle, METH_O, msvcrt_get_osfhandle__doc__},
static Py_intptr_t
-msvcrt_get_osfhandle_impl(PyModuleDef *module, int fd);
+msvcrt_get_osfhandle_impl(PyObject *module, int fd);
static PyObject *
-msvcrt_get_osfhandle(PyModuleDef *module, PyObject *arg)
+msvcrt_get_osfhandle(PyObject *module, PyObject *arg)
{
PyObject *return_value = NULL;
int fd;
@@ -175,10 +174,10 @@ PyDoc_STRVAR(msvcrt_kbhit__doc__,
{"kbhit", (PyCFunction)msvcrt_kbhit, METH_NOARGS, msvcrt_kbhit__doc__},
static long
-msvcrt_kbhit_impl(PyModuleDef *module);
+msvcrt_kbhit_impl(PyObject *module);
static PyObject *
-msvcrt_kbhit(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+msvcrt_kbhit(PyObject *module, PyObject *Py_UNUSED(ignored))
{
PyObject *return_value = NULL;
long _return_value;
@@ -208,10 +207,10 @@ PyDoc_STRVAR(msvcrt_getch__doc__,
{"getch", (PyCFunction)msvcrt_getch, METH_NOARGS, msvcrt_getch__doc__},
static int
-msvcrt_getch_impl(PyModuleDef *module);
+msvcrt_getch_impl(PyObject *module);
static PyObject *
-msvcrt_getch(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+msvcrt_getch(PyObject *module, PyObject *Py_UNUSED(ignored))
{
PyObject *return_value = NULL;
char s[1];
@@ -232,10 +231,10 @@ PyDoc_STRVAR(msvcrt_getwch__doc__,
{"getwch", (PyCFunction)msvcrt_getwch, METH_NOARGS, msvcrt_getwch__doc__},
static wchar_t
-msvcrt_getwch_impl(PyModuleDef *module);
+msvcrt_getwch_impl(PyObject *module);
static PyObject *
-msvcrt_getwch(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+msvcrt_getwch(PyObject *module, PyObject *Py_UNUSED(ignored))
{
PyObject *return_value = NULL;
wchar_t _return_value;
@@ -256,10 +255,10 @@ PyDoc_STRVAR(msvcrt_getche__doc__,
{"getche", (PyCFunction)msvcrt_getche, METH_NOARGS, msvcrt_getche__doc__},
static int
-msvcrt_getche_impl(PyModuleDef *module);
+msvcrt_getche_impl(PyObject *module);
static PyObject *
-msvcrt_getche(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+msvcrt_getche(PyObject *module, PyObject *Py_UNUSED(ignored))
{
PyObject *return_value = NULL;
char s[1];
@@ -280,10 +279,10 @@ PyDoc_STRVAR(msvcrt_getwche__doc__,
{"getwche", (PyCFunction)msvcrt_getwche, METH_NOARGS, msvcrt_getwche__doc__},
static wchar_t
-msvcrt_getwche_impl(PyModuleDef *module);
+msvcrt_getwche_impl(PyObject *module);
static PyObject *
-msvcrt_getwche(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
+msvcrt_getwche(PyObject *module, PyObject *Py_UNUSED(ignored))
{
PyObject *return_value = NULL;
wchar_t _return_value;
@@ -304,10 +303,10 @@ PyDoc_STRVAR(msvcrt_putch__doc__,
{"putch", (PyCFunction)msvcrt_putch, METH_O, msvcrt_putch__doc__},
static PyObject *
-msvcrt_putch_impl(PyModuleDef *module, char char_value);
+msvcrt_putch_impl(PyObject *module, char char_value);
static PyObject *
-msvcrt_putch(PyModuleDef *module, PyObject *arg)
+msvcrt_putch(PyObject *module, PyObject *arg)
{
PyObject *return_value = NULL;
char char_value;
@@ -330,10 +329,10 @@ PyDoc_STRVAR(msvcrt_putwch__doc__,
{"putwch", (PyCFunction)msvcrt_putwch, METH_O, msvcrt_putwch__doc__},
static PyObject *
-msvcrt_putwch_impl(PyModuleDef *module, int unicode_char);
+msvcrt_putwch_impl(PyObject *module, int unicode_char);
static PyObject *
-msvcrt_putwch(PyModuleDef *module, PyObject *arg)
+msvcrt_putwch(PyObject *module, PyObject *arg)
{
PyObject *return_value = NULL;
int unicode_char;
@@ -360,10 +359,10 @@ PyDoc_STRVAR(msvcrt_ungetch__doc__,
{"ungetch", (PyCFunction)msvcrt_ungetch, METH_O, msvcrt_ungetch__doc__},
static PyObject *
-msvcrt_ungetch_impl(PyModuleDef *module, char char_value);
+msvcrt_ungetch_impl(PyObject *module, char char_value);
static PyObject *
-msvcrt_ungetch(PyModuleDef *module, PyObject *arg)
+msvcrt_ungetch(PyObject *module, PyObject *arg)
{
PyObject *return_value = NULL;
char char_value;
@@ -386,10 +385,10 @@ PyDoc_STRVAR(msvcrt_ungetwch__doc__,
{"ungetwch", (PyCFunction)msvcrt_ungetwch, METH_O, msvcrt_ungetwch__doc__},
static PyObject *
-msvcrt_ungetwch_impl(PyModuleDef *module, int unicode_char);
+msvcrt_ungetwch_impl(PyObject *module, int unicode_char);
static PyObject *
-msvcrt_ungetwch(PyModuleDef *module, PyObject *arg)
+msvcrt_ungetwch(PyObject *module, PyObject *arg)
{
PyObject *return_value = NULL;
int unicode_char;
@@ -416,10 +415,10 @@ PyDoc_STRVAR(msvcrt_CrtSetReportFile__doc__,
{"CrtSetReportFile", (PyCFunction)msvcrt_CrtSetReportFile, METH_VARARGS, msvcrt_CrtSetReportFile__doc__},
static long
-msvcrt_CrtSetReportFile_impl(PyModuleDef *module, int type, int file);
+msvcrt_CrtSetReportFile_impl(PyObject *module, int type, int file);
static PyObject *
-msvcrt_CrtSetReportFile(PyModuleDef *module, PyObject *args)
+msvcrt_CrtSetReportFile(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
int type;
@@ -454,10 +453,10 @@ PyDoc_STRVAR(msvcrt_CrtSetReportMode__doc__,
{"CrtSetReportMode", (PyCFunction)msvcrt_CrtSetReportMode, METH_VARARGS, msvcrt_CrtSetReportMode__doc__},
static long
-msvcrt_CrtSetReportMode_impl(PyModuleDef *module, int type, int mode);
+msvcrt_CrtSetReportMode_impl(PyObject *module, int type, int mode);
static PyObject *
-msvcrt_CrtSetReportMode(PyModuleDef *module, PyObject *args)
+msvcrt_CrtSetReportMode(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
int type;
@@ -492,10 +491,10 @@ PyDoc_STRVAR(msvcrt_set_error_mode__doc__,
{"set_error_mode", (PyCFunction)msvcrt_set_error_mode, METH_O, msvcrt_set_error_mode__doc__},
static long
-msvcrt_set_error_mode_impl(PyModuleDef *module, int mode);
+msvcrt_set_error_mode_impl(PyObject *module, int mode);
static PyObject *
-msvcrt_set_error_mode(PyModuleDef *module, PyObject *arg)
+msvcrt_set_error_mode(PyObject *module, PyObject *arg)
{
PyObject *return_value = NULL;
int mode;
@@ -524,10 +523,10 @@ PyDoc_STRVAR(msvcrt_SetErrorMode__doc__,
{"SetErrorMode", (PyCFunction)msvcrt_SetErrorMode, METH_O, msvcrt_SetErrorMode__doc__},
static PyObject *
-msvcrt_SetErrorMode_impl(PyModuleDef *module, unsigned int mode);
+msvcrt_SetErrorMode_impl(PyObject *module, unsigned int mode);
static PyObject *
-msvcrt_SetErrorMode(PyModuleDef *module, PyObject *arg)
+msvcrt_SetErrorMode(PyObject *module, PyObject *arg)
{
PyObject *return_value = NULL;
unsigned int mode;
@@ -551,4 +550,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=16613d3119a1fd44 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=2a794c520d6ae887 input=a9049054013a1b77]*/
diff --git a/PC/clinic/winreg.c.h b/PC/clinic/winreg.c.h
index 338e33d39ab..f6ae2c0b921 100644
--- a/PC/clinic/winreg.c.h
+++ b/PC/clinic/winreg.c.h
@@ -135,11 +135,11 @@ 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,
+winreg_ConnectRegistry_impl(PyObject *module, Py_UNICODE *computer_name,
HKEY key);
static PyObject *
-winreg_ConnectRegistry(PyModuleDef *module, PyObject *args)
+winreg_ConnectRegistry(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
Py_UNICODE *computer_name;
@@ -181,10 +181,10 @@ PyDoc_STRVAR(winreg_CreateKey__doc__,
{"CreateKey", (PyCFunction)winreg_CreateKey, METH_VARARGS, winreg_CreateKey__doc__},
static HKEY
-winreg_CreateKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key);
+winreg_CreateKey_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key);
static PyObject *
-winreg_CreateKey(PyModuleDef *module, PyObject *args)
+winreg_CreateKey(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
HKEY key;
@@ -232,11 +232,11 @@ 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,
+winreg_CreateKeyEx_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key,
int reserved, REGSAM access);
static PyObject *
-winreg_CreateKeyEx(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+winreg_CreateKeyEx(PyObject *module, PyObject *args, PyObject *kwargs)
{
PyObject *return_value = NULL;
static char *_keywords[] = {"key", "sub_key", "reserved", "access", NULL};
@@ -280,10 +280,10 @@ PyDoc_STRVAR(winreg_DeleteKey__doc__,
{"DeleteKey", (PyCFunction)winreg_DeleteKey, METH_VARARGS, winreg_DeleteKey__doc__},
static PyObject *
-winreg_DeleteKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key);
+winreg_DeleteKey_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key);
static PyObject *
-winreg_DeleteKey(PyModuleDef *module, PyObject *args)
+winreg_DeleteKey(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
HKEY key;
@@ -327,11 +327,11 @@ 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,
+winreg_DeleteKeyEx_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key,
REGSAM access, int reserved);
static PyObject *
-winreg_DeleteKeyEx(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+winreg_DeleteKeyEx(PyObject *module, PyObject *args, PyObject *kwargs)
{
PyObject *return_value = NULL;
static char *_keywords[] = {"key", "sub_key", "access", "reserved", NULL};
@@ -364,10 +364,10 @@ PyDoc_STRVAR(winreg_DeleteValue__doc__,
{"DeleteValue", (PyCFunction)winreg_DeleteValue, METH_VARARGS, winreg_DeleteValue__doc__},
static PyObject *
-winreg_DeleteValue_impl(PyModuleDef *module, HKEY key, Py_UNICODE *value);
+winreg_DeleteValue_impl(PyObject *module, HKEY key, Py_UNICODE *value);
static PyObject *
-winreg_DeleteValue(PyModuleDef *module, PyObject *args)
+winreg_DeleteValue(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
HKEY key;
@@ -401,10 +401,10 @@ PyDoc_STRVAR(winreg_EnumKey__doc__,
{"EnumKey", (PyCFunction)winreg_EnumKey, METH_VARARGS, winreg_EnumKey__doc__},
static PyObject *
-winreg_EnumKey_impl(PyModuleDef *module, HKEY key, int index);
+winreg_EnumKey_impl(PyObject *module, HKEY key, int index);
static PyObject *
-winreg_EnumKey(PyModuleDef *module, PyObject *args)
+winreg_EnumKey(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
HKEY key;
@@ -447,10 +447,10 @@ PyDoc_STRVAR(winreg_EnumValue__doc__,
{"EnumValue", (PyCFunction)winreg_EnumValue, METH_VARARGS, winreg_EnumValue__doc__},
static PyObject *
-winreg_EnumValue_impl(PyModuleDef *module, HKEY key, int index);
+winreg_EnumValue_impl(PyObject *module, HKEY key, int index);
static PyObject *
-winreg_EnumValue(PyModuleDef *module, PyObject *args)
+winreg_EnumValue(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
HKEY key;
@@ -475,10 +475,10 @@ PyDoc_STRVAR(winreg_ExpandEnvironmentStrings__doc__,
{"ExpandEnvironmentStrings", (PyCFunction)winreg_ExpandEnvironmentStrings, METH_O, winreg_ExpandEnvironmentStrings__doc__},
static PyObject *
-winreg_ExpandEnvironmentStrings_impl(PyModuleDef *module, Py_UNICODE *string);
+winreg_ExpandEnvironmentStrings_impl(PyObject *module, Py_UNICODE *string);
static PyObject *
-winreg_ExpandEnvironmentStrings(PyModuleDef *module, PyObject *arg)
+winreg_ExpandEnvironmentStrings(PyObject *module, PyObject *arg)
{
PyObject *return_value = NULL;
Py_UNICODE *string;
@@ -514,10 +514,10 @@ PyDoc_STRVAR(winreg_FlushKey__doc__,
{"FlushKey", (PyCFunction)winreg_FlushKey, METH_O, winreg_FlushKey__doc__},
static PyObject *
-winreg_FlushKey_impl(PyModuleDef *module, HKEY key);
+winreg_FlushKey_impl(PyObject *module, HKEY key);
static PyObject *
-winreg_FlushKey(PyModuleDef *module, PyObject *arg)
+winreg_FlushKey(PyObject *module, PyObject *arg)
{
PyObject *return_value = NULL;
HKEY key;
@@ -562,11 +562,11 @@ 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,
+winreg_LoadKey_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key,
Py_UNICODE *file_name);
static PyObject *
-winreg_LoadKey(PyModuleDef *module, PyObject *args)
+winreg_LoadKey(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
HKEY key;
@@ -605,11 +605,11 @@ 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,
+winreg_OpenKey_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key,
int reserved, REGSAM access);
static PyObject *
-winreg_OpenKey(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+winreg_OpenKey(PyObject *module, PyObject *args, PyObject *kwargs)
{
PyObject *return_value = NULL;
static char *_keywords[] = {"key", "sub_key", "reserved", "access", NULL};
@@ -654,11 +654,11 @@ 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,
+winreg_OpenKeyEx_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key,
int reserved, REGSAM access);
static PyObject *
-winreg_OpenKeyEx(PyModuleDef *module, PyObject *args, PyObject *kwargs)
+winreg_OpenKeyEx(PyObject *module, PyObject *args, PyObject *kwargs)
{
PyObject *return_value = NULL;
static char *_keywords[] = {"key", "sub_key", "reserved", "access", NULL};
@@ -699,10 +699,10 @@ PyDoc_STRVAR(winreg_QueryInfoKey__doc__,
{"QueryInfoKey", (PyCFunction)winreg_QueryInfoKey, METH_O, winreg_QueryInfoKey__doc__},
static PyObject *
-winreg_QueryInfoKey_impl(PyModuleDef *module, HKEY key);
+winreg_QueryInfoKey_impl(PyObject *module, HKEY key);
static PyObject *
-winreg_QueryInfoKey(PyModuleDef *module, PyObject *arg)
+winreg_QueryInfoKey(PyObject *module, PyObject *arg)
{
PyObject *return_value = NULL;
HKEY key;
@@ -739,10 +739,10 @@ PyDoc_STRVAR(winreg_QueryValue__doc__,
{"QueryValue", (PyCFunction)winreg_QueryValue, METH_VARARGS, winreg_QueryValue__doc__},
static PyObject *
-winreg_QueryValue_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key);
+winreg_QueryValue_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key);
static PyObject *
-winreg_QueryValue(PyModuleDef *module, PyObject *args)
+winreg_QueryValue(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
HKEY key;
@@ -777,10 +777,10 @@ PyDoc_STRVAR(winreg_QueryValueEx__doc__,
{"QueryValueEx", (PyCFunction)winreg_QueryValueEx, METH_VARARGS, winreg_QueryValueEx__doc__},
static PyObject *
-winreg_QueryValueEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *name);
+winreg_QueryValueEx_impl(PyObject *module, HKEY key, Py_UNICODE *name);
static PyObject *
-winreg_QueryValueEx(PyModuleDef *module, PyObject *args)
+winreg_QueryValueEx(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
HKEY key;
@@ -820,10 +820,10 @@ PyDoc_STRVAR(winreg_SaveKey__doc__,
{"SaveKey", (PyCFunction)winreg_SaveKey, METH_VARARGS, winreg_SaveKey__doc__},
static PyObject *
-winreg_SaveKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *file_name);
+winreg_SaveKey_impl(PyObject *module, HKEY key, Py_UNICODE *file_name);
static PyObject *
-winreg_SaveKey(PyModuleDef *module, PyObject *args)
+winreg_SaveKey(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
HKEY key;
@@ -868,12 +868,12 @@ 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,
+winreg_SetValue_impl(PyObject *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)
+winreg_SetValue(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
HKEY key;
@@ -936,11 +936,11 @@ 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,
+winreg_SetValueEx_impl(PyObject *module, HKEY key, Py_UNICODE *value_name,
PyObject *reserved, DWORD type, PyObject *value);
static PyObject *
-winreg_SetValueEx(PyModuleDef *module, PyObject *args)
+winreg_SetValueEx(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
HKEY key;
@@ -977,10 +977,10 @@ PyDoc_STRVAR(winreg_DisableReflectionKey__doc__,
{"DisableReflectionKey", (PyCFunction)winreg_DisableReflectionKey, METH_O, winreg_DisableReflectionKey__doc__},
static PyObject *
-winreg_DisableReflectionKey_impl(PyModuleDef *module, HKEY key);
+winreg_DisableReflectionKey_impl(PyObject *module, HKEY key);
static PyObject *
-winreg_DisableReflectionKey(PyModuleDef *module, PyObject *arg)
+winreg_DisableReflectionKey(PyObject *module, PyObject *arg)
{
PyObject *return_value = NULL;
HKEY key;
@@ -1010,10 +1010,10 @@ PyDoc_STRVAR(winreg_EnableReflectionKey__doc__,
{"EnableReflectionKey", (PyCFunction)winreg_EnableReflectionKey, METH_O, winreg_EnableReflectionKey__doc__},
static PyObject *
-winreg_EnableReflectionKey_impl(PyModuleDef *module, HKEY key);
+winreg_EnableReflectionKey_impl(PyObject *module, HKEY key);
static PyObject *
-winreg_EnableReflectionKey(PyModuleDef *module, PyObject *arg)
+winreg_EnableReflectionKey(PyObject *module, PyObject *arg)
{
PyObject *return_value = NULL;
HKEY key;
@@ -1041,10 +1041,10 @@ PyDoc_STRVAR(winreg_QueryReflectionKey__doc__,
{"QueryReflectionKey", (PyCFunction)winreg_QueryReflectionKey, METH_O, winreg_QueryReflectionKey__doc__},
static PyObject *
-winreg_QueryReflectionKey_impl(PyModuleDef *module, HKEY key);
+winreg_QueryReflectionKey_impl(PyObject *module, HKEY key);
static PyObject *
-winreg_QueryReflectionKey(PyModuleDef *module, PyObject *arg)
+winreg_QueryReflectionKey(PyObject *module, PyObject *arg)
{
PyObject *return_value = NULL;
HKEY key;
@@ -1056,4 +1056,4 @@ winreg_QueryReflectionKey(PyModuleDef *module, PyObject *arg)
exit:
return return_value;
}
-/*[clinic end generated code: output=5e346dccc296f9f1 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=7b8940a23f605ddc input=a9049054013a1b77]*/
diff --git a/PC/clinic/winsound.c.h b/PC/clinic/winsound.c.h
index dca5a429f36..b00b442362d 100644
--- a/PC/clinic/winsound.c.h
+++ b/PC/clinic/winsound.c.h
@@ -17,10 +17,10 @@ PyDoc_STRVAR(winsound_PlaySound__doc__,
{"PlaySound", (PyCFunction)winsound_PlaySound, METH_VARARGS, winsound_PlaySound__doc__},
static PyObject *
-winsound_PlaySound_impl(PyModuleDef *module, Py_UNICODE *sound, int flags);
+winsound_PlaySound_impl(PyObject *module, Py_UNICODE *sound, int flags);
static PyObject *
-winsound_PlaySound(PyModuleDef *module, PyObject *args)
+winsound_PlaySound(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
Py_UNICODE *sound;
@@ -51,10 +51,10 @@ PyDoc_STRVAR(winsound_Beep__doc__,
{"Beep", (PyCFunction)winsound_Beep, METH_VARARGS, winsound_Beep__doc__},
static PyObject *
-winsound_Beep_impl(PyModuleDef *module, int frequency, int duration);
+winsound_Beep_impl(PyObject *module, int frequency, int duration);
static PyObject *
-winsound_Beep(PyModuleDef *module, PyObject *args)
+winsound_Beep(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
int frequency;
@@ -81,10 +81,10 @@ PyDoc_STRVAR(winsound_MessageBeep__doc__,
{"MessageBeep", (PyCFunction)winsound_MessageBeep, METH_VARARGS, winsound_MessageBeep__doc__},
static PyObject *
-winsound_MessageBeep_impl(PyModuleDef *module, int x);
+winsound_MessageBeep_impl(PyObject *module, int x);
static PyObject *
-winsound_MessageBeep(PyModuleDef *module, PyObject *args)
+winsound_MessageBeep(PyObject *module, PyObject *args)
{
PyObject *return_value = NULL;
int x = MB_OK;
@@ -97,4 +97,4 @@ winsound_MessageBeep(PyModuleDef *module, PyObject *args)
exit:
return return_value;
}
-/*[clinic end generated code: output=c5b018ac9dc1f500 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=c0b290daf2330dc9 input=a9049054013a1b77]*/
diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c
index 52d41007592..b0739d0167f 100644
--- a/PC/msvcrtmodule.c
+++ b/PC/msvcrtmodule.c
@@ -78,8 +78,8 @@ to the operating system. On failure, this raises OSError.
[clinic start generated code]*/
static PyObject *
-msvcrt_heapmin_impl(PyModuleDef *module)
-/*[clinic end generated code: output=464f866feb57c436 input=82e1771d21bde2d8]*/
+msvcrt_heapmin_impl(PyObject *module)
+/*[clinic end generated code: output=1ba00f344782dc19 input=82e1771d21bde2d8]*/
{
if (_heapmin() != 0)
return PyErr_SetFromErrno(PyExc_IOError);
@@ -105,8 +105,8 @@ individually.
[clinic start generated code]*/
static PyObject *
-msvcrt_locking_impl(PyModuleDef *module, int fd, int mode, long nbytes)
-/*[clinic end generated code: output=dff41e5e76d544de input=d9f13f0f6a713ba7]*/
+msvcrt_locking_impl(PyObject *module, int fd, int mode, long nbytes)
+/*[clinic end generated code: output=a4a90deca9785a03 input=d9f13f0f6a713ba7]*/
{
int err;
@@ -135,8 +135,8 @@ Return value is the previous mode.
[clinic start generated code]*/
static long
-msvcrt_setmode_impl(PyModuleDef *module, int fd, int flags)
-/*[clinic end generated code: output=8c84e5b37c586d0d input=76e7c01f6b137f75]*/
+msvcrt_setmode_impl(PyObject *module, int fd, int flags)
+/*[clinic end generated code: output=24a9be5ea07ccb9b input=76e7c01f6b137f75]*/
{
flags = _setmode(fd, flags);
if (flags == -1)
@@ -160,9 +160,8 @@ 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=86bce32582c49c06 input=4d8516ed32db8f65]*/
+msvcrt_open_osfhandle_impl(PyObject *module, Py_intptr_t handle, int flags)
+/*[clinic end generated code: output=bf65e422243a39f9 input=4d8516ed32db8f65]*/
{
int fd;
@@ -185,8 +184,8 @@ Raises IOError if fd is not recognized.
[clinic start generated code]*/
static Py_intptr_t
-msvcrt_get_osfhandle_impl(PyModuleDef *module, int fd)
-/*[clinic end generated code: output=376bff52586b55a6 input=c7d18d02c8017ec1]*/
+msvcrt_get_osfhandle_impl(PyObject *module, int fd)
+/*[clinic end generated code: output=eac47643338c0baa input=c7d18d02c8017ec1]*/
{
Py_intptr_t handle = -1;
@@ -212,8 +211,8 @@ Return true if a keypress is waiting to be read.
[clinic start generated code]*/
static long
-msvcrt_kbhit_impl(PyModuleDef *module)
-/*[clinic end generated code: output=2b7293fcbe5cb24e input=e70d678a5c2f6acc]*/
+msvcrt_kbhit_impl(PyObject *module)
+/*[clinic end generated code: output=940dfce6587c1890 input=e70d678a5c2f6acc]*/
{
return _kbhit();
}
@@ -231,8 +230,8 @@ cannot be read with this function.
[clinic start generated code]*/
static int
-msvcrt_getch_impl(PyModuleDef *module)
-/*[clinic end generated code: output=199e3d89f49c166a input=37a40cf0ed0d1153]*/
+msvcrt_getch_impl(PyObject *module)
+/*[clinic end generated code: output=a4e51f0565064a7d input=37a40cf0ed0d1153]*/
{
int ch;
@@ -249,8 +248,8 @@ Wide char variant of getch(), returning a Unicode value.
[clinic start generated code]*/
static wchar_t
-msvcrt_getwch_impl(PyModuleDef *module)
-/*[clinic end generated code: output=9d3762861328b1fe input=27b3dec8ad823d7c]*/
+msvcrt_getwch_impl(PyObject *module)
+/*[clinic end generated code: output=be9937494e22f007 input=27b3dec8ad823d7c]*/
{
wchar_t ch;
@@ -267,8 +266,8 @@ Similar to getch(), but the keypress will be echoed if possible.
[clinic start generated code]*/
static int
-msvcrt_getche_impl(PyModuleDef *module)
-/*[clinic end generated code: output=8aa369be6550068e input=43311ade9ed4a9c0]*/
+msvcrt_getche_impl(PyObject *module)
+/*[clinic end generated code: output=d8f7db4fd2990401 input=43311ade9ed4a9c0]*/
{
int ch;
@@ -285,8 +284,8 @@ Wide char variant of getche(), returning a Unicode value.
[clinic start generated code]*/
static wchar_t
-msvcrt_getwche_impl(PyModuleDef *module)
-/*[clinic end generated code: output=3693cf78e3ea0cf6 input=49337d59d1a591f8]*/
+msvcrt_getwche_impl(PyObject *module)
+/*[clinic end generated code: output=d0dae5ba3829d596 input=49337d59d1a591f8]*/
{
wchar_t ch;
@@ -306,8 +305,8 @@ Print the byte string char to the console without buffering.
[clinic start generated code]*/
static PyObject *
-msvcrt_putch_impl(PyModuleDef *module, char char_value)
-/*[clinic end generated code: output=c05548b11554f36f input=ec078dd10cb054d6]*/
+msvcrt_putch_impl(PyObject *module, char char_value)
+/*[clinic end generated code: output=92ec9b81012d8f60 input=ec078dd10cb054d6]*/
{
_putch(char_value);
Py_RETURN_NONE;
@@ -323,8 +322,8 @@ Wide char variant of putch(), accepting a Unicode value.
[clinic start generated code]*/
static PyObject *
-msvcrt_putwch_impl(PyModuleDef *module, int unicode_char)
-/*[clinic end generated code: output=c216a73694ca73dd input=996ccd0bbcbac4c3]*/
+msvcrt_putwch_impl(PyObject *module, int unicode_char)
+/*[clinic end generated code: output=a3bd1a8951d28eee input=996ccd0bbcbac4c3]*/
{
_putwch(unicode_char);
Py_RETURN_NONE;
@@ -345,8 +344,8 @@ getch() or getche().
[clinic start generated code]*/
static PyObject *
-msvcrt_ungetch_impl(PyModuleDef *module, char char_value)
-/*[clinic end generated code: output=19a4cd3249709ec9 input=22f07ee9001bbf0f]*/
+msvcrt_ungetch_impl(PyObject *module, char char_value)
+/*[clinic end generated code: output=c6942a0efa119000 input=22f07ee9001bbf0f]*/
{
if (_ungetch(char_value) == EOF)
return PyErr_SetFromErrno(PyExc_IOError);
@@ -363,8 +362,8 @@ Wide char variant of ungetch(), accepting a Unicode value.
[clinic start generated code]*/
static PyObject *
-msvcrt_ungetwch_impl(PyModuleDef *module, int unicode_char)
-/*[clinic end generated code: output=1ee7674710322bd1 input=83ec0492be04d564]*/
+msvcrt_ungetwch_impl(PyObject *module, int unicode_char)
+/*[clinic end generated code: output=e63af05438b8ba3d input=83ec0492be04d564]*/
{
if (_ungetwch(unicode_char) == WEOF)
return PyErr_SetFromErrno(PyExc_IOError);
@@ -385,8 +384,8 @@ Only available on Debug builds.
[clinic start generated code]*/
static long
-msvcrt_CrtSetReportFile_impl(PyModuleDef *module, int type, int file)
-/*[clinic end generated code: output=8c3644fb2edfa808 input=bb8f721a604fcc45]*/
+msvcrt_CrtSetReportFile_impl(PyObject *module, int type, int file)
+/*[clinic end generated code: output=df291c7fe032eb68 input=bb8f721a604fcc45]*/
{
return (long)_CrtSetReportFile(type, (_HFILE)file);
}
@@ -404,8 +403,8 @@ Only available on Debug builds.
[clinic start generated code]*/
static long
-msvcrt_CrtSetReportMode_impl(PyModuleDef *module, int type, int mode)
-/*[clinic end generated code: output=b407fbf8716a52b9 input=9319d29b4319426b]*/
+msvcrt_CrtSetReportMode_impl(PyObject *module, int type, int mode)
+/*[clinic end generated code: output=b2863761523de317 input=9319d29b4319426b]*/
{
int res;
@@ -427,8 +426,8 @@ Only available on Debug builds.
[clinic start generated code]*/
static long
-msvcrt_set_error_mode_impl(PyModuleDef *module, int mode)
-/*[clinic end generated code: output=62148adffa90867d input=046fca59c0f20872]*/
+msvcrt_set_error_mode_impl(PyObject *module, int mode)
+/*[clinic end generated code: output=ac4a09040d8ac4e3 input=046fca59c0f20872]*/
{
return _set_error_mode(mode);
}
@@ -444,8 +443,8 @@ Wrapper around SetErrorMode.
[clinic start generated code]*/
static PyObject *
-msvcrt_SetErrorMode_impl(PyModuleDef *module, unsigned int mode)
-/*[clinic end generated code: output=544c60b085be79c6 input=d8b167258d32d907]*/
+msvcrt_SetErrorMode_impl(PyObject *module, unsigned int mode)
+/*[clinic end generated code: output=01d529293f00da8f input=d8b167258d32d907]*/
{
unsigned int res;
diff --git a/PC/winreg.c b/PC/winreg.c
index d1c3f39525b..f08d9a47ffa 100644
--- a/PC/winreg.c
+++ b/PC/winreg.c
@@ -774,8 +774,8 @@ closed when the hkey object is destroyed by Python.
[clinic start generated code]*/
static PyObject *
-winreg_CloseKey(PyModuleDef *module, PyObject *hkey)
-/*[clinic end generated code: output=d96f73439403a064 input=5b1aac65ba5127ad]*/
+winreg_CloseKey(PyObject *module, PyObject *hkey)
+/*[clinic end generated code: output=a4fa537019a80d15 input=5b1aac65ba5127ad]*/
{
if (!PyHKEY_Close(hkey))
return NULL;
@@ -799,9 +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,
+winreg_ConnectRegistry_impl(PyObject *module, Py_UNICODE *computer_name,
HKEY key)
-/*[clinic end generated code: output=5c52f6f7ba6e7b46 input=5f98a891a347e68e]*/
+/*[clinic end generated code: output=5ab79d02aa3167b4 input=5f98a891a347e68e]*/
{
HKEY retKey;
long rc;
@@ -836,8 +836,8 @@ If the function fails, an OSError exception is raised.
[clinic start generated code]*/
static HKEY
-winreg_CreateKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key)
-/*[clinic end generated code: output=cd6843f30a73fc0e input=3cdd1622488acea2]*/
+winreg_CreateKey_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key)
+/*[clinic end generated code: output=9c81d4095527c927 input=3cdd1622488acea2]*/
{
HKEY retKey;
long rc;
@@ -875,9 +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,
+winreg_CreateKeyEx_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key,
int reserved, REGSAM access)
-/*[clinic end generated code: output=db835d5be84e72b2 input=42c2b03f98406b66]*/
+/*[clinic end generated code: output=b9fce6dc5c4e39b1 input=42c2b03f98406b66]*/
{
HKEY retKey;
long rc;
@@ -910,8 +910,8 @@ is removed. If the function fails, an OSError exception is raised.
[clinic start generated code]*/
static PyObject *
-winreg_DeleteKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key)
-/*[clinic end generated code: output=875c8917dacbc99d input=b31d225b935e4211]*/
+winreg_DeleteKey_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key)
+/*[clinic end generated code: output=7734b1e431991ae4 input=b31d225b935e4211]*/
{
long rc;
rc = RegDeleteKeyW(key, sub_key );
@@ -945,9 +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,
+winreg_DeleteKeyEx_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key,
REGSAM access, int reserved)
-/*[clinic end generated code: output=0362a0ac6502379f input=711d9d89e7ecbed7]*/
+/*[clinic end generated code: output=01378d86ad3eb936 input=711d9d89e7ecbed7]*/
{
HMODULE hMod;
typedef LONG (WINAPI *RDKEFunc)(HKEY, const wchar_t*, REGSAM, int);
@@ -987,8 +987,8 @@ Removes a named value from a registry key.
[clinic start generated code]*/
static PyObject *
-winreg_DeleteValue_impl(PyModuleDef *module, HKEY key, Py_UNICODE *value)
-/*[clinic end generated code: output=308550b8cdcfd8e1 input=a78d3407a4197b21]*/
+winreg_DeleteValue_impl(PyObject *module, HKEY key, Py_UNICODE *value)
+/*[clinic end generated code: output=67e7e9a514f84951 input=a78d3407a4197b21]*/
{
long rc;
Py_BEGIN_ALLOW_THREADS
@@ -1017,8 +1017,8 @@ raised, indicating no more values are available.
[clinic start generated code]*/
static PyObject *
-winreg_EnumKey_impl(PyModuleDef *module, HKEY key, int index)
-/*[clinic end generated code: output=58074ffabbc67896 input=fad9a7c00ab0e04b]*/
+winreg_EnumKey_impl(PyObject *module, HKEY key, int index)
+/*[clinic end generated code: output=25a6ec52cd147bc4 input=fad9a7c00ab0e04b]*/
{
long rc;
PyObject *retStr;
@@ -1068,8 +1068,8 @@ The result is a tuple of 3 items:
[clinic start generated code]*/
static PyObject *
-winreg_EnumValue_impl(PyModuleDef *module, HKEY key, int index)
-/*[clinic end generated code: output=4570367ebaf0e979 input=4414f47a6fb238b5]*/
+winreg_EnumValue_impl(PyObject *module, HKEY key, int index)
+/*[clinic end generated code: output=d363b5a06f8789ac input=4414f47a6fb238b5]*/
{
long rc;
wchar_t *retValueBuf;
@@ -1155,8 +1155,8 @@ Expand environment vars.
[clinic start generated code]*/
static PyObject *
-winreg_ExpandEnvironmentStrings_impl(PyModuleDef *module, Py_UNICODE *string)
-/*[clinic end generated code: output=4cb6914065a8663c input=b2a9714d2b751aa6]*/
+winreg_ExpandEnvironmentStrings_impl(PyObject *module, Py_UNICODE *string)
+/*[clinic end generated code: output=cba46ac293a8af1a input=b2a9714d2b751aa6]*/
{
wchar_t *retValue = NULL;
DWORD retValueSize;
@@ -1205,8 +1205,8 @@ a FlushKey() call is required, it probably isn't.
[clinic start generated code]*/
static PyObject *
-winreg_FlushKey_impl(PyModuleDef *module, HKEY key)
-/*[clinic end generated code: output=b9a7a6e405466420 input=f57457c12297d82f]*/
+winreg_FlushKey_impl(PyObject *module, HKEY key)
+/*[clinic end generated code: output=e6fc230d4c5dc049 input=f57457c12297d82f]*/
{
long rc;
Py_BEGIN_ALLOW_THREADS
@@ -1248,9 +1248,9 @@ tree.
[clinic start generated code]*/
static PyObject *
-winreg_LoadKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key,
+winreg_LoadKey_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key,
Py_UNICODE *file_name)
-/*[clinic end generated code: output=b8b700e39c695b90 input=e3b5b45ade311582]*/
+/*[clinic end generated code: output=87344005c5905cde input=e3b5b45ade311582]*/
{
long rc;
@@ -1282,9 +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,
+winreg_OpenKey_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key,
int reserved, REGSAM access)
-/*[clinic end generated code: output=79818ea356490a55 input=098505ac36a9ae28]*/
+/*[clinic end generated code: output=a905f1b947f3ce85 input=098505ac36a9ae28]*/
{
HKEY retKey;
long rc;
@@ -1309,9 +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,
+winreg_OpenKeyEx_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key,
int reserved, REGSAM access)
-/*[clinic end generated code: output=2dd9f29e84ea2dbc input=c6c4972af8622959]*/
+/*[clinic end generated code: output=226042593b37e940 input=c6c4972af8622959]*/
{
return winreg_OpenKey_impl(module, key, sub_key, reserved, access);
}
@@ -1333,8 +1333,8 @@ as 100's of nanoseconds since Jan 1, 1600.
[clinic start generated code]*/
static PyObject *
-winreg_QueryInfoKey_impl(PyModuleDef *module, HKEY key)
-/*[clinic end generated code: output=ae885222fe966a34 input=c3593802390cde1f]*/
+winreg_QueryInfoKey_impl(PyObject *module, HKEY key)
+/*[clinic end generated code: output=dc657b8356a4f438 input=c3593802390cde1f]*/
{
long rc;
DWORD nSubKeys, nValues;
@@ -1379,8 +1379,8 @@ completeness.
[clinic start generated code]*/
static PyObject *
-winreg_QueryValue_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key)
-/*[clinic end generated code: output=f91cb6f623c3b65a input=41cafbbf423b21d6]*/
+winreg_QueryValue_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key)
+/*[clinic end generated code: output=2bb8d1e02c10d0b6 input=41cafbbf423b21d6]*/
{
long rc;
PyObject *retStr;
@@ -1446,8 +1446,8 @@ The return value is a tuple of the value and the type_id.
[clinic start generated code]*/
static PyObject *
-winreg_QueryValueEx_impl(PyModuleDef *module, HKEY key, Py_UNICODE *name)
-/*[clinic end generated code: output=a4b07f7807194f23 input=cf366cada4836891]*/
+winreg_QueryValueEx_impl(PyObject *module, HKEY key, Py_UNICODE *name)
+/*[clinic end generated code: output=5b4fa3e33d6d3e8f input=cf366cada4836891]*/
{
long rc;
BYTE *retBuf, *tmp;
@@ -1519,8 +1519,8 @@ to the API.
[clinic start generated code]*/
static PyObject *
-winreg_SaveKey_impl(PyModuleDef *module, HKEY key, Py_UNICODE *file_name)
-/*[clinic end generated code: output=33109b96bfabef8f input=da735241f91ac7a2]*/
+winreg_SaveKey_impl(PyObject *module, HKEY key, Py_UNICODE *file_name)
+/*[clinic end generated code: output=1dda1502bd4c30d8 input=da735241f91ac7a2]*/
{
LPSECURITY_ATTRIBUTES pSA = NULL;
@@ -1565,10 +1565,10 @@ KEY_SET_VALUE access.
[clinic start generated code]*/
static PyObject *
-winreg_SetValue_impl(PyModuleDef *module, HKEY key, Py_UNICODE *sub_key,
+winreg_SetValue_impl(PyObject *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]*/
+/*[clinic end generated code: output=1e31931174820631 input=2cd2adab79339c53]*/
{
long rc;
@@ -1629,9 +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,
+winreg_SetValueEx_impl(PyObject *module, HKEY key, Py_UNICODE *value_name,
PyObject *reserved, DWORD type, PyObject *value)
-/*[clinic end generated code: output=ea092a935c361582 input=f1b16cbcc3ed4101]*/
+/*[clinic end generated code: output=c88c8426b6c00ec7 input=f1b16cbcc3ed4101]*/
{
BYTE *data;
DWORD len;
@@ -1672,8 +1672,8 @@ of any subkeys.
[clinic start generated code]*/
static PyObject *
-winreg_DisableReflectionKey_impl(PyModuleDef *module, HKEY key)
-/*[clinic end generated code: output=50fe6e2604324cdd input=a6c9e5ca5410193c]*/
+winreg_DisableReflectionKey_impl(PyObject *module, HKEY key)
+/*[clinic end generated code: output=830cce504cc764b4 input=a6c9e5ca5410193c]*/
{
HMODULE hMod;
typedef LONG (WINAPI *RDRKFunc)(HKEY);
@@ -1715,8 +1715,8 @@ subkeys.
[clinic start generated code]*/
static PyObject *
-winreg_EnableReflectionKey_impl(PyModuleDef *module, HKEY key)
-/*[clinic end generated code: output=e3f23edb414f24a4 input=7748abbacd1e166a]*/
+winreg_EnableReflectionKey_impl(PyObject *module, HKEY key)
+/*[clinic end generated code: output=86fa1385fdd9ce57 input=7748abbacd1e166a]*/
{
HMODULE hMod;
typedef LONG (WINAPI *RERKFunc)(HKEY);
@@ -1756,8 +1756,8 @@ Will generally raise NotImplemented if executed on a 32bit OS.
[clinic start generated code]*/
static PyObject *
-winreg_QueryReflectionKey_impl(PyModuleDef *module, HKEY key)
-/*[clinic end generated code: output=2a49c564ca162e50 input=9f325eacb5a65d88]*/
+winreg_QueryReflectionKey_impl(PyObject *module, HKEY key)
+/*[clinic end generated code: output=4e774af288c3ebb9 input=9f325eacb5a65d88]*/
{
HMODULE hMod;
typedef LONG (WINAPI *RQRKFunc)(HKEY, BOOL *);
diff --git a/PC/winsound.c b/PC/winsound.c
index 8e77d1387e1..6b79d238ed9 100644
--- a/PC/winsound.c
+++ b/PC/winsound.c
@@ -74,8 +74,8 @@ A wrapper around the Windows PlaySound API.
[clinic start generated code]*/
static PyObject *
-winsound_PlaySound_impl(PyModuleDef *module, Py_UNICODE *sound, int flags)
-/*[clinic end generated code: output=614273784bf59e5c input=3411b1b7c1f36d93]*/
+winsound_PlaySound_impl(PyObject *module, Py_UNICODE *sound, int flags)
+/*[clinic end generated code: output=ec24b3a2b4368378 input=3411b1b7c1f36d93]*/
{
int ok;
@@ -111,8 +111,8 @@ A wrapper around the Windows Beep API.
[clinic start generated code]*/
static PyObject *
-winsound_Beep_impl(PyModuleDef *module, int frequency, int duration)
-/*[clinic end generated code: output=c75f282035a872bd input=628a99d2ddf73798]*/
+winsound_Beep_impl(PyObject *module, int frequency, int duration)
+/*[clinic end generated code: output=f32382e52ee9b2fb input=628a99d2ddf73798]*/
{
BOOL ok;
@@ -145,8 +145,8 @@ x defaults to MB_OK.
[clinic start generated code]*/
static PyObject *
-winsound_MessageBeep_impl(PyModuleDef *module, int x)
-/*[clinic end generated code: output=92aa6a822bdc66ad input=a776c8a85c9853f6]*/
+winsound_MessageBeep_impl(PyObject *module, int x)
+/*[clinic end generated code: output=1ad89e4d8d30a957 input=a776c8a85c9853f6]*/
{
MessageBeep(x);
Py_RETURN_NONE;