Patchwork D12223: cext: unconditionally use PyLong_FromLong()

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

Comments

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

REVISION SUMMARY
  We no longer support Python 2.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/cext/dirs.c

CHANGE DETAILS




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

Patch

diff --git a/mercurial/cext/dirs.c b/mercurial/cext/dirs.c
--- a/mercurial/cext/dirs.c
+++ b/mercurial/cext/dirs.c
@@ -100,11 +100,7 @@ 
 		}
 
 		/* Force Python to not reuse a small shared int. */
-#ifdef IS_PY3K
 		val = PyLong_FromLong(0x1eadbeef);
-#else
-		val = PyInt_FromLong(0x1eadbeef);
-#endif
 
 		if (val == NULL)
 			goto bail;