Go to the documentation of this file. 1 #ifndef Py_LONGINTREPR_H
2 #define Py_LONGINTREPR_H
40 #if PYLONG_BITS_IN_DIGIT == 30
41 #if !(defined HAVE_UINT64_T && defined HAVE_UINT32_T && \
42 defined HAVE_INT64_T && defined HAVE_INT32_T)
43 #error "30-bit long digits requested, but the necessary types are not available on this platform"
49 #define PyLong_SHIFT 30
50 #define _PyLong_DECIMAL_SHIFT 9
51 #define _PyLong_DECIMAL_BASE ((digit)1000000000)
52 #elif PYLONG_BITS_IN_DIGIT == 15
53 typedef unsigned short digit;
55 typedef unsigned long twodigits;
56 typedef long stwodigits;
57 #define PyLong_SHIFT 15
58 #define _PyLong_DECIMAL_SHIFT 4
59 #define _PyLong_DECIMAL_BASE ((digit)10000)
61 #error "PYLONG_BITS_IN_DIGIT should be 15 or 30"
63 #define PyLong_BASE ((digit)1 << PyLong_SHIFT)
64 #define PyLong_MASK ((digit)(PyLong_BASE - 1))
67 #define SHIFT PyLong_SHIFT
68 #define BASE PyLong_BASE
69 #define MASK PyLong_MASK
71 #if PyLong_SHIFT % 5 != 0
72 #error "longobject.c requires that PyLong_SHIFT be divisible by 5"
Copyright 2014 Google Inc. All rights reserved.