Mercurial > hg
diff mercurial/cext/mpatch.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 | d4ba4d51f85f |
children | b0dd39b91e7a |
line wrap: on
line diff
--- a/mercurial/cext/mpatch.c Mon Feb 21 19:51:23 2022 +0000 +++ b/mercurial/cext/mpatch.c Sun Feb 20 15:40:39 2022 -0700 @@ -182,7 +182,6 @@ static const int version = 1; -#ifdef IS_PY3K static struct PyModuleDef mpatch_module = { PyModuleDef_HEAD_INIT, "mpatch", mpatch_doc, -1, methods, }; @@ -203,13 +202,3 @@ return m; } -#else -PyMODINIT_FUNC initmpatch(void) -{ - PyObject *m; - m = Py_InitModule3("mpatch", methods, mpatch_doc); - mpatch_Error = - PyErr_NewException("mercurial.cext.mpatch.mpatchError", NULL, NULL); - PyModule_AddIntConstant(m, "version", version); -} -#endif