diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-03-17 16:48:27 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-03-17 16:48:27 (GMT) |
commit | f024d263b4af789af0eb3727417bbeec582f69eb (patch) | |
tree | fac003f32f4a6c4fdda1a9e40ac7c1a82a8594a1 | |
parent | beb09977bce49df9d5a8f23a488f89368916bca7 (diff) | |
download | cpython-f024d263b4af789af0eb3727417bbeec582f69eb.zip cpython-f024d263b4af789af0eb3727417bbeec582f69eb.tar.gz cpython-f024d263b4af789af0eb3727417bbeec582f69eb.tar.bz2 |
Issue #23685: Fix usage of PyMODINIT_FUNC in _json, _scproxy, nis, pyexpat
_codecs_cn, _codecs_hk, _codecs_iso2022, _codecs_jp, _codecs_kr and _codecs_tw
modules.
pyexpat.c doesn't need to redeclare PyMODINIT_FUNC, it's already declared in
Include/pyport.h.
-rw-r--r-- | Modules/_json.c | 2 | ||||
-rw-r--r-- | Modules/_scproxy.c | 2 | ||||
-rw-r--r-- | Modules/cjkcodecs/cjkcodecs.h | 2 | ||||
-rw-r--r-- | Modules/nismodule.c | 4 | ||||
-rw-r--r-- | Modules/pyexpat.c | 10 |
5 files changed, 5 insertions, 15 deletions
diff --git a/Modules/_json.c b/Modules/_json.c index 076859f..3a60243 100644 --- a/Modules/_json.c +++ b/Modules/_json.c @@ -1995,7 +1995,7 @@ static struct PyModuleDef jsonmodule = { NULL }; -PyObject* +PyMODINIT_FUNC PyInit__json(void) { PyObject *m = PyModule_Create(&jsonmodule); diff --git a/Modules/_scproxy.c b/Modules/_scproxy.c index 3b2a38e..66b6e34 100644 --- a/Modules/_scproxy.c +++ b/Modules/_scproxy.c @@ -249,7 +249,7 @@ static struct PyModuleDef mod_module = { extern "C" { #endif -PyObject* +PyMODINIT_FUNC PyInit__scproxy(void) { return PyModule_Create(&mod_module); diff --git a/Modules/cjkcodecs/cjkcodecs.h b/Modules/cjkcodecs/cjkcodecs.h index a45ed12..23642df 100644 --- a/Modules/cjkcodecs/cjkcodecs.h +++ b/Modules/cjkcodecs/cjkcodecs.h @@ -401,7 +401,7 @@ errorexit: NULL, \ NULL \ }; \ - PyObject* \ + PyMODINIT_FUNC \ PyInit__codecs_##loc(void) \ { \ PyObject *m = PyModule_Create(&__module); \ diff --git a/Modules/nismodule.c b/Modules/nismodule.c index 0af495f..64eb5db 100644 --- a/Modules/nismodule.c +++ b/Modules/nismodule.c @@ -456,8 +456,8 @@ static struct PyModuleDef nismodule = { NULL }; -PyObject* -PyInit_nis (void) +PyMODINIT_FUNC +PyInit_nis(void) { PyObject *m, *d; m = PyModule_Create(&nismodule); diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index 21cb04a..ce65354 100644 --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -1900,16 +1900,6 @@ PyDoc_STRVAR(pyexpat_module_documentation, #define MODULE_INITFUNC PyInit_pyexpat #endif -#ifndef PyMODINIT_FUNC -# ifdef MS_WINDOWS -# define PyMODINIT_FUNC __declspec(dllexport) void -# else -# define PyMODINIT_FUNC void -# endif -#endif - -PyMODINIT_FUNC MODULE_INITFUNC(void); /* avoid compiler warnings */ - static struct PyModuleDef pyexpatmodule = { PyModuleDef_HEAD_INIT, MODULE_NAME, |