[Python-checkins] r61065 - python/trunk/Include/longintrepr.h
christian.heimes
python-checkins at python.org
Mon Feb 25 18:32:07 CET 2008
Author: christian.heimes
Date: Mon Feb 25 18:32:07 2008
New Revision: 61065
Modified:
python/trunk/Include/longintrepr.h
Log:
Thomas Herve explained to me that PyCrypto depends on the constants. I'm adding the aliases because C code for Python 2.x should compile under 2.6 as well. The aliases aren't available in Python 3.x though.
Modified: python/trunk/Include/longintrepr.h
==============================================================================
--- python/trunk/Include/longintrepr.h (original)
+++ python/trunk/Include/longintrepr.h Mon Feb 25 18:32:07 2008
@@ -28,8 +28,13 @@
#define PyLong_BASE ((digit)1 << PyLong_SHIFT)
#define PyLong_MASK ((int)(PyLong_BASE - 1))
+/* b/w compatibility with Python 2.5 */
+#define SHIFT PyLong_SHIFT
+#define BASE PyLong_BASE
+#define MASK PyLong_MASK
+
#if PyLong_SHIFT % 5 != 0
-#error "longobject.c requires that SHIFT be divisible by 5"
+#error "longobject.c requires that PyLong_SHIFT be divisible by 5"
#endif
/* Long integer representation.
More information about the Python-checkins
mailing list