@@ -222,25 +222,15 @@ PyAPI_FUNC(int) _PyLong_Size_t_Converter(PyObject *, void *);
222222 * 2: Reserved for immortality bit
223223 * 3+ Unsigned digit count
224224 */
225- #define SIGN_MASK 3
225+ #define SIGN_MASK _PyLong_SIGN_MASK
226226#define SIGN_ZERO 1
227227#define SIGN_NEGATIVE 2
228- #define NON_SIZE_BITS 3
228+ #define NON_SIZE_BITS _PyLong_NON_SIZE_BITS
229229
230- /* The functions _PyLong_IsCompact and _PyLong_CompactValue are defined
231- * in Include/cpython/longobject.h, since they need to be inline.
232- *
233- * "Compact" values have at least one bit to spare,
230+ /* "Compact" values have at least one bit to spare,
234231 * so that addition and subtraction can be performed on the values
235232 * without risk of overflow.
236- *
237- * The inline functions need tag bits.
238- * For readability, rather than do `#define SIGN_MASK _PyLong_SIGN_MASK`
239- * we define them to the numbers in both places and then assert that
240- * they're the same.
241233 */
242- static_assert (SIGN_MASK == _PyLong_SIGN_MASK ,"SIGN_MASK does not match _PyLong_SIGN_MASK" );
243- static_assert (NON_SIZE_BITS == _PyLong_NON_SIZE_BITS ,"NON_SIZE_BITS does not match _PyLong_NON_SIZE_BITS" );
244234
245235/* All *compact" values are guaranteed to fit into
246236 * a Py_ssize_t with at least one bit to spare.