Patchwork D12225: cext: remove Python 2 variant of listdir_slot()

login
register
mail settings
Submitter phabricator
Date March 2, 2022, 12:24 a.m.
Message ID <differential-rev-PHID-DREV-3vpyiapcnyvtckvsk2ws-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50563/
State New
Headers show

Comments

phabricator - March 2, 2022, 12:24 a.m.
indygreg created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D12225

AFFECTED FILES
  mercurial/cext/osutil.c

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/cext/osutil.c b/mercurial/cext/osutil.c
--- a/mercurial/cext/osutil.c
+++ b/mercurial/cext/osutil.c
@@ -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)