diff options
Diffstat (limited to 'Include/longintrepr.h')
| -rw-r--r-- | Include/longintrepr.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/longintrepr.h b/Include/longintrepr.h index 7765172be9..b94f7b2e2c 100644 --- a/Include/longintrepr.h +++ b/Include/longintrepr.h @@ -1,3 +1,4 @@ +#ifndef Py_LIMITED_API #ifndef Py_LONGINTREPR_H #define Py_LONGINTREPR_H #ifdef __cplusplus @@ -50,12 +51,16 @@ typedef PY_INT32_T sdigit; /* signed variant of digit */ typedef PY_UINT64_T twodigits; typedef PY_INT64_T stwodigits; /* signed variant of twodigits */ #define PyLong_SHIFT 30 +#define _PyLong_DECIMAL_SHIFT 9 /* max(e such that 10**e fits in a digit) */ +#define _PyLong_DECIMAL_BASE ((digit)1000000000) /* 10 ** DECIMAL_SHIFT */ #elif PYLONG_BITS_IN_DIGIT == 15 typedef unsigned short digit; typedef short sdigit; /* signed variant of digit */ typedef unsigned long twodigits; typedef long stwodigits; /* signed variant of twodigits */ #define PyLong_SHIFT 15 +#define _PyLong_DECIMAL_SHIFT 4 /* max(e such that 10**e fits in a digit) */ +#define _PyLong_DECIMAL_BASE ((digit)10000) /* 10 ** DECIMAL_SHIFT */ #else #error "PYLONG_BITS_IN_DIGIT should be 15 or 30" #endif @@ -95,3 +100,4 @@ PyAPI_FUNC(PyObject *) _PyLong_Copy(PyLongObject *src); } #endif #endif /* !Py_LONGINTREPR_H */ +#endif /* Py_LIMITED_API */ |
