summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Include/Python.h1
-rw-r--r--Misc/NEWS2
-rw-r--r--Modules/_io/stringio.c1
-rw-r--r--Modules/_json.c2
-rw-r--r--Objects/accu.c1
-rw-r--r--Objects/listobject.c1
-rw-r--r--Objects/stringlib/unicode_format.h1
-rw-r--r--Objects/tupleobject.c1
8 files changed, 9 insertions, 1 deletions
diff --git a/Include/Python.h b/Include/Python.h
index 01b98f9b13..6affbf5ede 100644
--- a/Include/Python.h
+++ b/Include/Python.h
@@ -101,7 +101,6 @@
#include "warnings.h"
#include "weakrefobject.h"
#include "structseq.h"
-#include "accu.h"
#include "codecs.h"
#include "pyerrors.h"
diff --git a/Misc/NEWS b/Misc/NEWS
index 85ac5c0354..81c3740884 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -155,6 +155,8 @@ Library
Build
-----
+- Issue #14387: Do not include accu.h from Python.h.
+
- Issue #14359: Only use O_CLOEXEC in _posixmodule.c if it is defined.
Based on patch from Hervé Coatanhay.
diff --git a/Modules/_io/stringio.c b/Modules/_io/stringio.c
index c4794c9474..a1c31c0856 100644
--- a/Modules/_io/stringio.c
+++ b/Modules/_io/stringio.c
@@ -1,6 +1,7 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "structmember.h"
+#include "accu.h"
#include "_iomodule.h"
/* Implementation note: the buffer is always at least one character longer
diff --git a/Modules/_json.c b/Modules/_json.c
index cafd5a9e11..95c658ca7c 100644
--- a/Modules/_json.c
+++ b/Modules/_json.c
@@ -1,5 +1,7 @@
#include "Python.h"
#include "structmember.h"
+#include "accu.h"
+
#if PY_VERSION_HEX < 0x02060000 && !defined(Py_TYPE)
#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
#endif
diff --git a/Objects/accu.c b/Objects/accu.c
index 88e8f08f59..5bd2ee41fe 100644
--- a/Objects/accu.c
+++ b/Objects/accu.c
@@ -1,6 +1,7 @@
/* Accumulator struct implementation */
#include "Python.h"
+#include "accu.h"
static PyObject *
join_list_unicode(PyObject *lst)
diff --git a/Objects/listobject.c b/Objects/listobject.c
index 6f1edc55d8..c22342bec7 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -1,6 +1,7 @@
/* List object implementation */
#include "Python.h"
+#include "accu.h"
#ifdef STDC_HEADERS
#include <stddef.h>
diff --git a/Objects/stringlib/unicode_format.h b/Objects/stringlib/unicode_format.h
index f05847a8bd..68070889e9 100644
--- a/Objects/stringlib/unicode_format.h
+++ b/Objects/stringlib/unicode_format.h
@@ -2,6 +2,7 @@
unicode_format.h -- implementation of str.format().
*/
+#include "accu.h"
/* Defines for more efficiently reallocating the string buffer */
#define INITIAL_SIZE_INCREMENT 100
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index d58839e091..dde34ade11 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -2,6 +2,7 @@
/* Tuple object implementation */
#include "Python.h"
+#include "accu.h"
/* Speed optimization to avoid frequent malloc/free of small tuples */
#ifndef PyTuple_MAXSAVESIZE