summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorYureka <yuka@yuka.dev>2024-06-30 09:40:40 (GMT)
committerGitHub <noreply@github.com>2024-06-30 09:40:40 (GMT)
commitc3677befbecbd7fa94cde8c1fecaa4cc18e6aa2b (patch)
tree8bbb07678ccb996e4b7135cc6752af58afa5e272 /Include
parent48cd104b0cf05dad8958efa9cb9666c029ef9201 (diff)
downloadcpython-c3677befbecbd7fa94cde8c1fecaa4cc18e6aa2b.zip
cpython-c3677befbecbd7fa94cde8c1fecaa4cc18e6aa2b.tar.gz
cpython-c3677befbecbd7fa94cde8c1fecaa4cc18e6aa2b.tar.bz2
gh-119447: Fix build with _PY_SHORT_FLOAT_REPR == 0 (#121178)
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_dtoa.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/Include/internal/pycore_dtoa.h b/Include/internal/pycore_dtoa.h
index c5cfdf4..e4222c5 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
@@ -66,8 +64,6 @@ extern char* _Py_dg_dtoa(double d, int mode, int ndigits,
int *decpt, int *sign, char **rve);
extern void _Py_dg_freedtoa(char *s);
-#endif // _PY_SHORT_FLOAT_REPR == 1
-
extern PyStatus _PyDtoa_Init(PyInterpreterState *interp);
extern void _PyDtoa_Fini(PyInterpreterState *interp);