diff options
author | Christian Heimes <christian@cheimes.de> | 2008-02-25 17:32:07 +0000 |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2008-02-25 17:32:07 +0000 |
commit | a3c8c10201fb38fb078a4ad2758d945d44c07a5f (patch) | |
tree | 744b847b48412c4f0a35c1520e4a65950f65ded3 | |
parent | 734451a4bcc900fd9d159b0c6d4fcdca17cc31bb (diff) | |
download | cpython-git-a3c8c10201fb38fb078a4ad2758d945d44c07a5f.tar.gz |
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.
-rw-r--r-- | Include/longintrepr.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Include/longintrepr.h b/Include/longintrepr.h index 00af752ea8..df157a8f98 100644 --- a/Include/longintrepr.h +++ b/Include/longintrepr.h @@ -28,8 +28,13 @@ typedef BASE_TWODIGITS_TYPE stwodigits; /* signed variant of twodigits */ #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. |