util: define PyInt_Type on Python 3
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 08 Oct 2016 19:02:44 +0200
changeset 30091 d576b7394646
parent 30090 8abe9264c73a
child 30092 67b0484c9ce4
util: define PyInt_Type on Python 3 util.h attempts to wallpaper over C API differences between Python 2 and 3. This is not the correct approach where performance is critical. But it is good enough for the current state of the Python 3 port.
mercurial/util.h
--- a/mercurial/util.h	Sat Oct 08 17:51:29 2016 +0200
+++ b/mercurial/util.h	Sat Oct 08 19:02:44 2016 +0200
@@ -13,6 +13,7 @@
 #if PY_MAJOR_VERSION >= 3
 
 #define IS_PY3K
+#define PyInt_Type PyLong_Type
 #define PyInt_FromLong PyLong_FromLong
 #define PyInt_AsLong PyLong_AsLong