8000 gh-119447: Fix build with _PY_SHORT_FLOAT_REPR == 0 (#121178) · vstinner/cpython@42c4e94 · GitHub
[go: up one dir, main page]

Skip to content

Commit 42c4e94

Browse files
yuyuyurekavstinner
authored andcommitted
pythongh-119447: Fix build with _PY_SHORT_FLOAT_REPR == 0 (python#121178)
(cherry picked from commit c3677be)
1 parent d474772 commit 42c4e94

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Include/internal/pycore_dtoa.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ extern "C" {
1111
#include "pycore_pymath.h" // _PY_SHORT_FLOAT_REPR
1212

1313

14-
#if _PY_SHORT_FLOAT_REPR == 1
15-
1614
typedef uint32_t ULong;
1715

1816
struct
@@ -22,15 +20,15 @@ Bigint {
2220
ULong x[1];
2321
};
2422

25-
#ifdef Py_USING_MEMORY_DEBUGGER
23+
#if defined(Py_USING_MEMORY_DEBUGGER) || _PY_SHORT_FLOAT_REPR == 0
2624

2725
struct _dtoa_state {
2826
int _not_used;
2927
};
30-
#define _dtoa_interp_state_INIT(INTERP) \
28+
#define _dtoa_state_INIT(INTERP) \
3129
{0}
3230

33-
#else // !Py_USING_MEMORY_DEBUGGER
31+
#else // !Py_USING_MEMORY_DEBUGGER && _PY_SHORT_FLOAT_REPR != 0
3432

3533
/* The size of the Bigint freelist */
3634
#define Bigint_Kmax 7
@@ -65,8 +63,6 @@ PyAPI_FUNC(char *) _Py_dg_dtoa(double d, int mode, int ndigits,
6563
int *decpt, int *sign, char **rve);
6664
PyAPI_FUNC(void) _Py_dg_freedtoa(char *s);
6765

68-
#endif // _PY_SHORT_FLOAT_REPR == 1
69-
7066
#ifdef __cplusplus
7167
}
7268
#endif

0 commit comments

Comments
 (0)
0