File tree 2 files changed +10
-12
lines changed
2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -85,20 +85,13 @@ Used in: Py_SAFE_DOWNCAST
85
85
#define PY_INT32_T int32_t
86
86
#define PY_INT64_T int64_t
87
87
88
- /* If PYLONG_BITS_IN_DIGIT is not defined then we'll use 30-bit digits if all
89
- the necessary integer types are available, and we're on a 64-bit platform
90
- (as determined by SIZEOF_VOID_P); otherwise we use 15-bit digits.
91
-
92
- From pyodide: WASM has 32 bit pointers but has native 64 bit arithmetic
93
- so it is more efficient to use 30 bit digits.
88
+ /* PYLONG_BITS_IN_DIGIT describes the number of bits per "digit" (limb) in the
89
+ * PyLongObject implementation (longintrepr.h). It's currently either 30 or 15,
90
+ * defaulting to 30. The 15-bit PyLong digit option may be removed in the
91
+ * future.
94
92
*/
95
-
96
93
#ifndef PYLONG_BITS_IN_DIGIT
97
- #if SIZEOF_VOID_P >= 8 || defined(__wasm__ )
98
- # define PYLONG_BITS_IN_DIGIT 30
99
- #else
100
- # define PYLONG_BITS_IN_DIGIT 15
101
- #endif
94
+ #define PYLONG_BITS_IN_DIGIT 30
102
95
#endif
103
96
104
97
/* uintptr_t is the C9X name for an unsigned integral type such that a
Original file line number Diff line number Diff line change
1
+ The build now defaults to using 30-bit digits for Python integers. Previously
2
+ either 15-bit or 30-bit digits would be selected, depending on the platform.
3
+ 15-bit digits may still be selected using the ``--enable-big-digits=15 `` option
4
+ to the ``configure `` script, or by defining ``PYLONG_BITS_IN_DIGIT `` in
5
+ ``pyconfig.h ``.
You can’t perform that action at this time.
0 commit comments