[3.12] gh-119447: Fix build with _PY_SHORT_FLOAT_REPR == 0 (#121178) (#121180)
![](https://secure.gravatar.com/avatar/cc7737cd64a84f1b5c61a160798e97ee.jpg?s=120&d=mm&r=g)
https://github.com/python/cpython/commit/e0b9905ce66fc0a73165608f8e67cc7d3da... commit: e0b9905ce66fc0a73165608f8e67cc7d3dabbeb8 branch: 3.12 author: Victor Stinner <vstinner@python.org> committer: vstinner <vstinner@python.org> date: 2024-06-30T10:02:08Z summary: [3.12] gh-119447: Fix build with _PY_SHORT_FLOAT_REPR == 0 (#121178) (#121180) gh-119447: Fix build with _PY_SHORT_FLOAT_REPR == 0 (#121178) (cherry picked from commit c3677befbecbd7fa94cde8c1fecaa4cc18e6aa2b) Co-authored-by: Yureka <yuka@yuka.dev> files: M Include/internal/pycore_dtoa.h diff --git a/Include/internal/pycore_dtoa.h b/Include/internal/pycore_dtoa.h index 4d9681d59a64f7..899d413b05e865 100644 --- a/Include/internal/pycore_dtoa.h +++ b/Include/internal/pycore_dtoa.h @@ -11,8 +11,6 @@ extern "C" { #include "pycore_pymath.h" // _PY_SHORT_FLOAT_REPR -#if _PY_SHORT_FLOAT_REPR == 1 - typedef uint32_t ULong; struct @@ -22,15 +20,15 @@ Bigint { ULong x[1]; }; -#ifdef Py_USING_MEMORY_DEBUGGER +#if defined(Py_USING_MEMORY_DEBUGGER) || _PY_SHORT_FLOAT_REPR == 0 struct _dtoa_state { int _not_used; }; -#define _dtoa_interp_state_INIT(INTERP) \ +#define _dtoa_state_INIT(INTERP) \ {0} -#else // !Py_USING_MEMORY_DEBUGGER +#else // !Py_USING_MEMORY_DEBUGGER && _PY_SHORT_FLOAT_REPR != 0 /* The size of the Bigint freelist */ #define Bigint_Kmax 7 @@ -65,8 +63,6 @@ PyAPI_FUNC(char *) _Py_dg_dtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve); PyAPI_FUNC(void) _Py_dg_freedtoa(char *s); -#endif // _PY_SHORT_FLOAT_REPR == 1 - #ifdef __cplusplus } #endif
participants (1)
-
vstinner