Issue #23685: Fix usage of PyMODINIT_FUNC in _json, _scproxy, nis, py… · pythoncapi/cpython@f024d26 · GitHub
Skip to content

Commit f024d26

Browse files
committed
Issue python#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.
1 parent beb0997 commit f024d26

5 files changed

Lines changed: 5 additions & 15 deletions

File tree

Modules/_json.c

Lines changed: 1 addition & 1 deletion

Modules/_scproxy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ static struct PyModuleDef mod_module = {
249249
extern "C" {
250250
#endif
251251

252-
PyObject*
252+
PyMODINIT_FUNC
253253
PyInit__scproxy(void)
254254
{
255255
return PyModule_Create(&mod_module);

Modules/cjkcodecs/cjkcodecs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ importmap(const char *modname, const char *symbol,
401401
NULL, \
402402
NULL \
403403
}; \
404-
PyObject* \
404+
PyMODINIT_FUNC \
405405
PyInit__codecs_##loc(void) \
406406
{ \
407407
PyObject *m = PyModule_Create(&__module); \

Modules/nismodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,8 +456,8 @@ static struct PyModuleDef nismodule = {
456456
NULL
457457
};
458458

459-
PyObject*
460-
PyInit_nis (void)
459+
PyMODINIT_FUNC
460+
PyInit_nis(void)
461461
{
462462
PyObject *m, *d;
463463
m = PyModule_Create(&nismodule);

Modules/pyexpat.c

Lines changed: 0 additions & 10 deletions

0 commit comments

Comments
 (0)