diff mercurial/cext/osutil.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 41bd7e8fc82e
line wrap: on
line diff
--- a/mercurial/cext/osutil.c	Mon Feb 21 19:51:23 2022 +0000
+++ b/mercurial/cext/osutil.c	Sun Feb 20 15:40:39 2022 -0700
@@ -1387,7 +1387,6 @@
 
 static const int version = 4;
 
-#ifdef IS_PY3K
 static struct PyModuleDef osutil_module = {
 	PyModuleDef_HEAD_INIT,
 	"osutil",
@@ -1406,14 +1405,3 @@
 	PyModule_AddIntConstant(m, "version", version);
 	return m;
 }
-#else
-PyMODINIT_FUNC initosutil(void)
-{
-	PyObject *m;
-	if (PyType_Ready(&listdir_stat_type) == -1)
-		return;
-
-	m = Py_InitModule3("osutil", methods, osutil_doc);
-	PyModule_AddIntConstant(m, "version", version);
-}
-#endif