# HG changeset patch # User Gregory Szorc # Date 1645397116 25200 # Node ID 41bd7e8fc82eaa675b92d6610de6b27a72f0c5c4 # Parent be3af7eb2bbbe9bf61c46a9ea647bf4319d0b7ae cext: remove Python 2 variant of listdir_slot() Differential Revision: https://phab.mercurial-scm.org/D12225 diff -r be3af7eb2bbb -r 41bd7e8fc82e 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)