# HG changeset patch
# User Gregory Szorc <gregory.sz...@gmail.com>
# Date 1476357760 -7200
#      Thu Oct 13 13:22:40 2016 +0200
# Node ID b9e9955e74842914d77b892fed7a0ff3a4f2d85e
# Parent  1e3d29ee42903dfb65308a849f987dbe9de97953
parsers: alias more PyInt* symbols on Python 3

I feel dirty for having to do this. But this is currently our approach
for dealing with PyInt -> PyLong in Python 3 for this file.

This removes a ton of compiler warnings by fixing unresolved symbols.

diff --git a/mercurial/parsers.c b/mercurial/parsers.c
--- a/mercurial/parsers.c
+++ b/mercurial/parsers.c
@@ -19,9 +19,12 @@
 /* The mapping of Python types is meant to be temporary to get Python
  * 3 to compile. We should remove this once Python 3 support is fully
  * supported and proper types are used in the extensions themselves. */
 #define PyInt_Type PyLong_Type
+#define PyInt_Check PyLong_Check
 #define PyInt_FromLong PyLong_FromLong
+#define PyInt_FromSsize_t PyLong_FromSsize_t
+#define PyInt_AS_LONG PyLong_AS_LONG
 #define PyInt_AsLong PyLong_AsLong
 static char *versionerrortext = "Python minor version mismatch";
Mercurial-devel mailing list

Reply via email to