summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-10-31 19:19:24 (GMT)
committerGitHub <noreply@github.com>2018-10-31 19:19:24 (GMT)
commit2be00d987d37682a55db67c298e82c405d01b868 (patch)
treeeffedc3003c8a19764ba20f44a63501e66e58327 /Python
parentb08746bfdf64e55ce33516f2065fa2aa4f51be95 (diff)
downloadcpython-2be00d987d37682a55db67c298e82c405d01b868.zip
cpython-2be00d987d37682a55db67c298e82c405d01b868.tar.gz
cpython-2be00d987d37682a55db67c298e82c405d01b868.tar.bz2
bpo-35081: Move Py_BUILD_CORE code to internal/mem.h (GH-10249)
* Add #include "internal/mem.h" to C files using _PyMem_SetDefaultAllocator(). * Include/internal/mem.h now requires Py_BUILD_CORE to be defined.
Diffstat (limited to 'Python')
-rw-r--r--Python/coreconfig.c1
-rw-r--r--Python/import.c1
-rw-r--r--Python/pathconfig.c1
-rw-r--r--Python/pylifecycle.c1
-rw-r--r--Python/pystate.c1
-rw-r--r--Python/sysmodule.c1
6 files changed, 6 insertions, 0 deletions
diff --git a/Python/coreconfig.c b/Python/coreconfig.c
index a82175e..81086f4 100644
--- a/Python/coreconfig.c
+++ b/Python/coreconfig.c
@@ -1,4 +1,5 @@
#include "Python.h"
+#include "internal/mem.h"
#include "internal/pystate.h"
#include <locale.h>
#ifdef HAVE_LANGINFO_H
diff --git a/Python/import.c b/Python/import.c
index e761f65..338cd30 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -5,6 +5,7 @@
#include "Python-ast.h"
#undef Yield /* undefine macro conflicting with winbase.h */
#include "internal/hash.h"
+#include "internal/mem.h"
#include "internal/pystate.h"
#include "errcode.h"
#include "marshal.h"
diff --git a/Python/pathconfig.c b/Python/pathconfig.c
index 4e0830f..efccb8d 100644
--- a/Python/pathconfig.c
+++ b/Python/pathconfig.c
@@ -2,6 +2,7 @@
#include "Python.h"
#include "osdefs.h"
+#include "internal/mem.h"
#include "internal/pystate.h"
#include <wchar.h>
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index f1579c7..78691a5 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -6,6 +6,7 @@
#undef Yield /* undefine macro conflicting with winbase.h */
#include "internal/context.h"
#include "internal/hamt.h"
+#include "internal/mem.h"
#include "internal/pystate.h"
#include "grammar.h"
#include "node.h"
diff --git a/Python/pystate.c b/Python/pystate.c
index d049811..98e954d 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -2,6 +2,7 @@
/* Thread and interpreter state structures and their interfaces */
#include "Python.h"
+#include "internal/mem.h"
#include "internal/pystate.h"
#define _PyThreadState_SET(value) \
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 9579eae..71414c9 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -15,6 +15,7 @@ Data members:
*/
#include "Python.h"
+#include "internal/mem.h"
#include "internal/pystate.h"
#include "code.h"
#include "frameobject.h"