Skip to content

Commit

Permalink
pythongh-119447: Fix build with _PY_SHORT_FLOAT_REPR == 0 (python#121178
Browse files Browse the repository at this point in the history
)

(cherry picked from commit c3677be)
  • Loading branch information
yu-re-ka authored and vstinner committed Jun 30, 2024
1 parent d474772 commit 42c4e94
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Include/internal/pycore_dtoa.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 42c4e94

Please sign in to comment.