[PATCH] util: document we want Python type mapping to be temporary
Gregory Szorc
gregory.szorc at gmail.com
Sat Oct 8 17:16:54 UTC 2016
# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1475947010 -7200
# Sat Oct 08 19:16:50 2016 +0200
# Node ID d15d8ac73cfd2d1ddbd443262ccad9c68ee69406
# Parent 266ad9c9faa524a8b3f473c924db409681cb205e
util: document we want Python type mapping to be temporary
I think remapping Python C API types and functions is not a great
approach. I'd prefer this whole #ifdef disappeared. Add a comment
so we don't forget about it.
diff --git a/mercurial/util.h b/mercurial/util.h
--- a/mercurial/util.h
+++ b/mercurial/util.h
@@ -12,8 +12,11 @@
#if PY_MAJOR_VERSION >= 3
#define 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
More information about the Mercurial-devel
mailing list