Mercurial > hg
diff mercurial/cext/parsers.c @ 48810:ed03fffaac30
cext: remove Python 2 module initializer functions
We no longer need these since we dropped support for Python 2.
Differential Revision: https://phab.mercurial-scm.org/D12221
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 20 Feb 2022 15:40:39 -0700 |
parents | be2317167a9b |
children | 824b2082550e |
line wrap: on
line diff
--- a/mercurial/cext/parsers.c Mon Feb 21 19:51:23 2022 +0000 +++ b/mercurial/cext/parsers.c Sun Feb 20 15:40:39 2022 -0700 @@ -1307,7 +1307,6 @@ return 0; } -#ifdef IS_PY3K static struct PyModuleDef parsers_module = {PyModuleDef_HEAD_INIT, "parsers", parsers_doc, -1, methods}; @@ -1321,15 +1320,3 @@ module_init(mod); return mod; } -#else -PyMODINIT_FUNC initparsers(void) -{ - PyObject *mod; - - if (check_python_version() == -1) { - return; - } - mod = Py_InitModule3("parsers", methods, parsers_doc); - module_init(mod); -} -#endif