python313: drop patch for _PY_SHORT_FLOAT_REPR == 0

The patch was merged upstream and is included in Python 3.13b4.
This commit is contained in:
Randy Eckenrode
2024-07-21 00:26:22 -04:00
parent 53f938e573
commit 0e8dbe9540
2 changed files with 2 additions and 60 deletions
@@ -1,53 +0,0 @@
From 94d8a9efe6ec86a6e5b4806dbfb82ac926286456 Mon Sep 17 00:00:00 2001
From: Yureka <yuka@yuka.dev>
Date: Sun, 30 Jun 2024 09:45:58 +0200
Subject: [PATCH] Fix build with _PY_SHORT_FLOAT_REPR == 0
---
Include/internal/pycore_dtoa.h | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/Include/internal/pycore_dtoa.h b/Include/internal/pycore_dtoa.h
index c5cfdf4ce8..e4222c5267 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);
--
2.45.1
@@ -366,15 +366,10 @@ in with passthru; stdenv.mkDerivation (finalAttrs: {
};
in [
"${mingw-patch}/*.patch"
]) ++ optionals (pythonAtLeast "3.12") [
]) ++ optionals isPy312 [
# backport fix for various platforms; armv7l, riscv64, s390
# https://github.com/python/cpython/pull/121178
(
if (pythonAtLeast "3.13") then
./3.13/0001-Fix-build-with-_PY_SHORT_FLOAT_REPR-0.patch
else
./3.12/0001-Fix-build-with-_PY_SHORT_FLOAT_REPR-0.patch
)
./3.12/0001-Fix-build-with-_PY_SHORT_FLOAT_REPR-0.patch
];
postPatch = optionalString (!stdenv.hostPlatform.isWindows) ''