summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-11-01 02:15:58 (GMT)
committerGitHub <noreply@github.com>2018-11-01 02:15:58 (GMT)
commita1c249c40517917d2e0971d55aea8d14a44b2cc8 (patch)
tree626ca174cb49d8dd299f529cc100485a08bea9d2 /Python
parente281f7d80ce2584a7e6a36acffb5a9cd796a0fe2 (diff)
downloadcpython-a1c249c40517917d2e0971d55aea8d14a44b2cc8.zip
cpython-a1c249c40517917d2e0971d55aea8d14a44b2cc8.tar.gz
cpython-a1c249c40517917d2e0971d55aea8d14a44b2cc8.tar.bz2
bpo-35081: And pycore_lifecycle.h and pycore_pathconfig.h (GH-10273)
* And pycore_lifecycle.h and pycore_pathconfig.h headers to Include/internal/ * Move Py_BUILD_CORE specific code from coreconfig.h and pylifecycle.h to pycore_pathconfig.h and pycore_lifecycle.h * Move _Py_wstrlist_XXX() definitions and _PyPathConfig code from pycore_state.h to pycore_pathconfig.h * Move "Init" and "Fini" function definitions from pylifecycle.c to pycore_lifecycle.h.
Diffstat (limited to 'Python')
-rw-r--r--Python/coreconfig.c2
-rw-r--r--Python/import.c1
-rw-r--r--Python/pathconfig.c1
-rw-r--r--Python/pylifecycle.c16
-rw-r--r--Python/sysmodule.c6
5 files changed, 10 insertions, 16 deletions
diff --git a/Python/coreconfig.c b/Python/coreconfig.c
index ad14a8a..b21e934 100644
--- a/Python/coreconfig.c
+++ b/Python/coreconfig.c
@@ -1,5 +1,7 @@
#include "Python.h"
+#include "pycore_lifecycle.h"
#include "pycore_mem.h"
+#include "pycore_pathconfig.h"
#include "pycore_state.h"
#include <locale.h>
#ifdef HAVE_LANGINFO_H
diff --git a/Python/import.c b/Python/import.c
index 18cd29d..67911ff 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 "pycore_hash.h"
+#include "pycore_lifecycle.h"
#include "pycore_mem.h"
#include "pycore_state.h"
#include "errcode.h"
diff --git a/Python/pathconfig.c b/Python/pathconfig.c
index 0406415..f8bcc28 100644
--- a/Python/pathconfig.c
+++ b/Python/pathconfig.c
@@ -3,6 +3,7 @@
#include "Python.h"
#include "osdefs.h"
#include "pycore_mem.h"
+#include "pycore_pathconfig.h"
#include "pycore_state.h"
#include <wchar.h>
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index 160f30c..4c5cb53 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -6,7 +6,9 @@
#undef Yield /* undefine macro conflicting with winbase.h */
#include "pycore_context.h"
#include "pycore_hamt.h"
+#include "pycore_lifecycle.h"
#include "pycore_mem.h"
+#include "pycore_pathconfig.h"
#include "pycore_state.h"
#include "grammar.h"
#include "node.h"
@@ -62,20 +64,6 @@ static _PyInitError initsigs(void);
static void call_py_exitfuncs(PyInterpreterState *);
static void wait_for_thread_shutdown(void);
static void call_ll_exitfuncs(void);
-extern int _PyUnicode_Init(void);
-extern int _PyStructSequence_Init(void);
-extern void _PyUnicode_Fini(void);
-extern int _PyLong_Init(void);
-extern void PyLong_Fini(void);
-extern _PyInitError _PyFaulthandler_Init(int enable);
-extern void _PyFaulthandler_Fini(void);
-extern void _PyHash_Fini(void);
-extern int _PyTraceMalloc_Init(int enable);
-extern int _PyTraceMalloc_Fini(void);
-extern void _Py_ReadyTypes(void);
-
-extern void _PyGILState_Init(PyInterpreterState *, PyThreadState *);
-extern void _PyGILState_Fini(void);
_PyRuntimeState _PyRuntime = _PyRuntimeState_INIT;
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 830f0a8..2164708 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -15,10 +15,12 @@ Data members:
*/
#include "Python.h"
-#include "pycore_mem.h"
-#include "pycore_state.h"
#include "code.h"
#include "frameobject.h"
+#include "pycore_lifecycle.h"
+#include "pycore_mem.h"
+#include "pycore_pathconfig.h"
+#include "pycore_state.h"
#include "pythread.h"
#include "osdefs.h"