mirror of
https://github.com/python/cpython.git
synced 2025-11-13 15:40:05 +00:00
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.
This commit is contained in:
parent
734451a4bc
commit
a3c8c10201
1 changed files with 6 additions and 1 deletions
|
|
@ -28,8 +28,13 @@ typedef BASE_TWODIGITS_TYPE stwodigits; /* signed variant of twodigits */
|
||||||
#define PyLong_BASE ((digit)1 << PyLong_SHIFT)
|
#define PyLong_BASE ((digit)1 << PyLong_SHIFT)
|
||||||
#define PyLong_MASK ((int)(PyLong_BASE - 1))
|
#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
|
#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
|
#endif
|
||||||
|
|
||||||
/* Long integer representation.
|
/* Long integer representation.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue