mirror of
https://github.com/python/cpython.git
synced 2025-09-28 11:15:17 +00:00
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.
This commit is contained in:
parent
beb09977bc
commit
f024d263b4
5 changed files with 5 additions and 15 deletions
|
@ -1995,7 +1995,7 @@ static struct PyModuleDef jsonmodule = {
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
PyObject*
|
PyMODINIT_FUNC
|
||||||
PyInit__json(void)
|
PyInit__json(void)
|
||||||
{
|
{
|
||||||
PyObject *m = PyModule_Create(&jsonmodule);
|
PyObject *m = PyModule_Create(&jsonmodule);
|
||||||
|
|
|
@ -249,7 +249,7 @@ static struct PyModuleDef mod_module = {
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PyObject*
|
PyMODINIT_FUNC
|
||||||
PyInit__scproxy(void)
|
PyInit__scproxy(void)
|
||||||
{
|
{
|
||||||
return PyModule_Create(&mod_module);
|
return PyModule_Create(&mod_module);
|
||||||
|
|
|
@ -401,7 +401,7 @@ errorexit:
|
||||||
NULL, \
|
NULL, \
|
||||||
NULL \
|
NULL \
|
||||||
}; \
|
}; \
|
||||||
PyObject* \
|
PyMODINIT_FUNC \
|
||||||
PyInit__codecs_##loc(void) \
|
PyInit__codecs_##loc(void) \
|
||||||
{ \
|
{ \
|
||||||
PyObject *m = PyModule_Create(&__module); \
|
PyObject *m = PyModule_Create(&__module); \
|
||||||
|
|
|
@ -456,8 +456,8 @@ static struct PyModuleDef nismodule = {
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
PyObject*
|
PyMODINIT_FUNC
|
||||||
PyInit_nis (void)
|
PyInit_nis(void)
|
||||||
{
|
{
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
m = PyModule_Create(&nismodule);
|
m = PyModule_Create(&nismodule);
|
||||||
|
|
|
@ -1900,16 +1900,6 @@ PyDoc_STRVAR(pyexpat_module_documentation,
|
||||||
#define MODULE_INITFUNC PyInit_pyexpat
|
#define MODULE_INITFUNC PyInit_pyexpat
|
||||||
#endif
|
#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 = {
|
static struct PyModuleDef pyexpatmodule = {
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
MODULE_NAME,
|
MODULE_NAME,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue