Skip to content

Commit b215211

Browse files
yuyuyurekamrahtz
authored andcommitted
gh-119447: Fix build with _PY_SHORT_FLOAT_REPR == 0 (#121178)
1 parent 14e2c0e commit b215211

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
@@ -66,8 +64,6 @@ extern char* _Py_dg_dtoa(double d, int mode, int ndigits,
6664
int *decpt, int *sign, char **rve);
6765
extern void _Py_dg_freedtoa(char *s);
6866

69-
#endif // _PY_SHORT_FLOAT_REPR == 1
70-
7167

7268
extern PyStatus _PyDtoa_Init(PyInterpreterState *interp);
7369
extern void _PyDtoa_Fini(PyInterpreterState *interp);

0 commit comments

Comments
 (0)