cext: remove Python 2 variant of listdir_slot()
authorGregory Szorc <gregory.szorc@gmail.com>
Sun, 20 Feb 2022 15:45:16 -0700
changeset 48814 41bd7e8fc82e
parent 48813 be3af7eb2bbb
child 48815 e9ca736f5b52
cext: remove Python 2 variant of listdir_slot() Differential Revision: https://phab.mercurial-scm.org/D12225
mercurial/cext/osutil.c
--- a/mercurial/cext/osutil.c	Sun Feb 20 15:44:39 2022 -0700
+++ b/mercurial/cext/osutil.c	Sun Feb 20 15:45:16 2022 -0700
@@ -73,19 +73,11 @@
 };
 #endif
 
-#ifdef IS_PY3K
 #define listdir_slot(name) \
 	static PyObject *listdir_stat_##name(PyObject *self, void *x) \
 	{ \
 		return PyLong_FromLong(((struct listdir_stat *)self)->st.name); \
 	}
-#else
-#define listdir_slot(name) \
-	static PyObject *listdir_stat_##name(PyObject *self, void *x) \
-	{ \
-		return PyInt_FromLong(((struct listdir_stat *)self)->st.name); \
-	}
-#endif
 
 listdir_slot(st_dev)
 listdir_slot(st_mode)