mercurial/parsers.c
changeset 30112 9b6ff0f940ed
parent 30103 74cd33c9be76
child 30169 5f7151e6de85
--- a/mercurial/parsers.c	Sun Oct 09 13:47:46 2016 +0200
+++ b/mercurial/parsers.c	Sun Oct 09 13:50:53 2016 +0200
@@ -15,6 +15,15 @@
 #include "util.h"
 #include "bitmanipulation.h"
 
+#ifdef IS_PY3K
+/* 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_FromLong PyLong_FromLong
+#define PyInt_AsLong PyLong_AsLong
+#endif
+
 static char *versionerrortext = "Python minor version mismatch";
 
 static int8_t hextable[256] = {