summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Include/internal/pycore_atomic.h (renamed from Include/internal/pyatomic.h)0
-rw-r--r--Include/internal/pycore_ceval.h (renamed from Include/internal/ceval.h)4
-rw-r--r--Include/internal/pycore_condvar.h (renamed from Include/internal/condvar.h)0
-rw-r--r--Include/internal/pycore_context.h (renamed from Include/internal/context.h)2
-rw-r--r--Include/internal/pycore_getopt.h (renamed from Include/internal/pygetopt.h)0
-rw-r--r--Include/internal/pycore_gil.h (renamed from Include/internal/gil.h)4
-rw-r--r--Include/internal/pycore_hamt.h (renamed from Include/internal/hamt.h)0
-rw-r--r--Include/internal/pycore_hash.h (renamed from Include/internal/hash.h)0
-rw-r--r--Include/internal/pycore_mem.h (renamed from Include/internal/mem.h)0
-rw-r--r--Include/internal/pycore_state.h (renamed from Include/internal/pystate.h)6
-rw-r--r--Include/internal/pycore_warnings.h (renamed from Include/internal/warnings.h)0
-rw-r--r--Include/pystate.h2
-rw-r--r--Makefile.pre.in18
-rw-r--r--Modules/Setup12
-rw-r--r--Modules/_functoolsmodule.c4
-rw-r--r--Modules/_io/bufferedio.c2
-rw-r--r--Modules/_threadmodule.c2
-rw-r--r--Modules/_xxsubinterpretersmodule.c2
-rw-r--r--Modules/gcmodule.c6
-rw-r--r--Modules/getpath.c2
-rw-r--r--Modules/main.c6
-rwxr-xr-xModules/makesetup2
-rw-r--r--Modules/posixmodule.c2
-rw-r--r--Modules/signalmodule.c2
-rw-r--r--Objects/abstract.c2
-rw-r--r--Objects/bytearrayobject.c4
-rw-r--r--Objects/bytesobject.c4
-rw-r--r--Objects/call.c2
-rw-r--r--Objects/cellobject.c4
-rw-r--r--Objects/classobject.c4
-rw-r--r--Objects/codeobject.c2
-rw-r--r--Objects/descrobject.c2
-rw-r--r--Objects/dictobject.c2
-rw-r--r--Objects/exceptions.c4
-rw-r--r--Objects/frameobject.c2
-rw-r--r--Objects/funcobject.c4
-rw-r--r--Objects/genobject.c2
-rw-r--r--Objects/iterobject.c4
-rw-r--r--Objects/listobject.c2
-rw-r--r--Objects/memoryobject.c4
-rw-r--r--Objects/methodobject.c4
-rw-r--r--Objects/moduleobject.c2
-rw-r--r--Objects/object.c4
-rw-r--r--Objects/obmalloc.c2
-rw-r--r--Objects/odictobject.c2
-rw-r--r--Objects/setobject.c2
-rw-r--r--Objects/sliceobject.c4
-rw-r--r--Objects/tupleobject.c2
-rw-r--r--Objects/typeobject.c2
-rw-r--r--Objects/unicodeobject.c2
-rw-r--r--PC/getpathp.c2
-rw-r--r--PCbuild/pyproject.props4
-rw-r--r--PCbuild/pythoncore.vcxproj19
-rw-r--r--PCbuild/pythoncore.vcxproj.filters24
-rw-r--r--Parser/myreadline.c2
-rw-r--r--Parser/pgenmain.c4
-rw-r--r--Python/_warnings.c2
-rw-r--r--Python/bltinmodule.c2
-rw-r--r--Python/ceval.c2
-rw-r--r--Python/ceval_gil.h2
-rw-r--r--Python/codecs.c2
-rw-r--r--Python/condvar.h2
-rw-r--r--Python/context.c6
-rw-r--r--Python/coreconfig.c4
-rw-r--r--Python/dynload_shlib.c2
-rw-r--r--Python/errors.c2
-rw-r--r--Python/frozenmain.c2
-rw-r--r--Python/getopt.c2
-rw-r--r--Python/hamt.c4
-rw-r--r--Python/import.c6
-rw-r--r--Python/pathconfig.c4
-rw-r--r--Python/pylifecycle.c8
-rw-r--r--Python/pystate.c4
-rw-r--r--Python/pythonrun.c2
-rw-r--r--Python/symtable.c2
-rw-r--r--Python/sysmodule.c4
-rw-r--r--Python/thread.c2
-rw-r--r--Python/traceback.c2
78 files changed, 138 insertions, 137 deletions
diff --git a/Include/internal/pyatomic.h b/Include/internal/pycore_atomic.h
index 5f349cc3e9..5f349cc3e9 100644
--- a/Include/internal/pyatomic.h
+++ b/Include/internal/pycore_atomic.h
diff --git a/Include/internal/ceval.h b/Include/internal/pycore_ceval.h
index 4297b5a51c..ddeeb5c425 100644
--- a/Include/internal/ceval.h
+++ b/Include/internal/pycore_ceval.h
@@ -4,7 +4,7 @@
extern "C" {
#endif
-#include "internal/pyatomic.h"
+#include "pycore_atomic.h"
#include "pythread.h"
struct _pending_calls {
@@ -25,7 +25,7 @@ struct _pending_calls {
int last;
};
-#include "internal/gil.h"
+#include "pycore_gil.h"
struct _ceval_runtime_state {
int recursion_limit;
diff --git a/Include/internal/condvar.h b/Include/internal/pycore_condvar.h
index f9330890d3..f9330890d3 100644
--- a/Include/internal/condvar.h
+++ b/Include/internal/pycore_condvar.h
diff --git a/Include/internal/context.h b/Include/internal/pycore_context.h
index 59f88f2614..57a410c06f 100644
--- a/Include/internal/context.h
+++ b/Include/internal/pycore_context.h
@@ -2,7 +2,7 @@
#define Py_INTERNAL_CONTEXT_H
-#include "internal/hamt.h"
+#include "pycore_hamt.h"
struct _pycontextobject {
diff --git a/Include/internal/pygetopt.h b/Include/internal/pycore_getopt.h
index 8ef2ada72f..8ef2ada72f 100644
--- a/Include/internal/pygetopt.h
+++ b/Include/internal/pycore_getopt.h
diff --git a/Include/internal/gil.h b/Include/internal/pycore_gil.h
index 7743b3f0aa..5059850d76 100644
--- a/Include/internal/gil.h
+++ b/Include/internal/pycore_gil.h
@@ -4,8 +4,8 @@
extern "C" {
#endif
-#include "internal/condvar.h"
-#include "internal/pyatomic.h"
+#include "pycore_condvar.h"
+#include "pycore_atomic.h"
#ifndef Py_HAVE_CONDVAR
# error You need either a POSIX-compatible or a Windows system!
diff --git a/Include/internal/hamt.h b/Include/internal/pycore_hamt.h
index 29ad28b1d8..29ad28b1d8 100644
--- a/Include/internal/hamt.h
+++ b/Include/internal/pycore_hamt.h
diff --git a/Include/internal/hash.h b/Include/internal/pycore_hash.h
index e14b80a7f2..e14b80a7f2 100644
--- a/Include/internal/hash.h
+++ b/Include/internal/pycore_hash.h
diff --git a/Include/internal/mem.h b/Include/internal/pycore_mem.h
index 4a41b77734..4a41b77734 100644
--- a/Include/internal/mem.h
+++ b/Include/internal/pycore_mem.h
diff --git a/Include/internal/pystate.h b/Include/internal/pycore_state.h
index 38845d32ec..ff25d2ebf4 100644
--- a/Include/internal/pystate.h
+++ b/Include/internal/pycore_state.h
@@ -7,9 +7,9 @@ extern "C" {
#include "pystate.h"
#include "pythread.h"
-#include "internal/mem.h"
-#include "internal/ceval.h"
-#include "internal/warnings.h"
+#include "pycore_mem.h"
+#include "pycore_ceval.h"
+#include "pycore_warnings.h"
/* GIL state */
diff --git a/Include/internal/warnings.h b/Include/internal/pycore_warnings.h
index 2878a28a2e..2878a28a2e 100644
--- a/Include/internal/warnings.h
+++ b/Include/internal/pycore_warnings.h
diff --git a/Include/pystate.h b/Include/pystate.h
index 8860f12400..7fc921e9ac 100644
--- a/Include/pystate.h
+++ b/Include/pystate.h
@@ -250,7 +250,7 @@ PyAPI_FUNC(PyInterpreterState *) _PyInterpreterState_Get(void);
#endif
#ifdef Py_BUILD_CORE
/* Macro which should only be used for performance critical code.
- Need "#include "internal/pystate.h". See also _PyInterpreterState_Get()
+ Need "#include "pycore_state.h". See also _PyInterpreterState_Get()
and _PyGILState_GetInterpreterStateUnsafe(). */
# define _PyInterpreterState_GET_UNSAFE() (PyThreadState_GET()->interp)
#endif
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 232025f1cb..0336290dd8 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -91,7 +91,7 @@ CONFIGURE_LDFLAGS= @LDFLAGS@
# command line to append to these values without stomping the pre-set
# values.
PY_CFLAGS= $(BASECFLAGS) $(OPT) $(CONFIGURE_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
-PY_CFLAGS_NODIST=$(CONFIGURE_CFLAGS_NODIST) $(CFLAGS_NODIST)
+PY_CFLAGS_NODIST=$(CONFIGURE_CFLAGS_NODIST) $(CFLAGS_NODIST) -I$(srcdir)/Include/internal
# Both CPPFLAGS and LDFLAGS need to contain the shell's value for setup.py to
# be able to build extension modules using the directories specified in the
# environment variables
@@ -1025,14 +1025,14 @@ PYTHON_HEADERS= \
pyconfig.h \
$(PARSER_HEADERS) \
$(srcdir)/Include/Python-ast.h \
- $(srcdir)/Include/internal/ceval.h \
- $(srcdir)/Include/internal/gil.h \
- $(srcdir)/Include/internal/mem.h \
- $(srcdir)/Include/internal/pyatomic.h \
- $(srcdir)/Include/internal/pygetopt.h \
- $(srcdir)/Include/internal/pystate.h \
- $(srcdir)/Include/internal/context.h \
- $(srcdir)/Include/internal/warnings.h \
+ $(srcdir)/Include/internal/pycore_atomic.h \
+ $(srcdir)/Include/internal/pycore_ceval.h \
+ $(srcdir)/Include/internal/pycore_context.h \
+ $(srcdir)/Include/internal/pycore_getopt.h \
+ $(srcdir)/Include/internal/pycore_gil.h \
+ $(srcdir)/Include/internal/pycore_mem.h \
+ $(srcdir)/Include/internal/pycore_state.h \
+ $(srcdir)/Include/internal/pycore_warnings.h \
$(DTRACE_HEADERS)
$(LIBRARY_OBJS) $(MODOBJS) Programs/python.o: $(PYTHON_HEADERS)
diff --git a/Modules/Setup b/Modules/Setup
index fb16698d2f..c1804630b9 100644
--- a/Modules/Setup
+++ b/Modules/Setup
@@ -101,29 +101,29 @@ PYTHONPATH=$(COREPYTHONPATH)
# This only contains the minimal set of modules required to run the
# setup.py script in the root of the Python source tree.
-posix -DPy_BUILD_CORE posixmodule.c # posix (UNIX) system calls
+posix -DPy_BUILD_CORE -I$(srcdir)/Include/internal posixmodule.c # posix (UNIX) system calls
errno errnomodule.c # posix (UNIX) errno values
pwd pwdmodule.c # this is needed to find out the user's home dir
# if $HOME is not set
_sre _sre.c # Fredrik Lundh's new regular expressions
_codecs _codecsmodule.c # access to the builtin codecs and codec registry
_weakref _weakref.c # weak references
-_functools -DPy_BUILD_CORE _functoolsmodule.c # Tools for working with functions and callable objects
+_functools -DPy_BUILD_CORE -I$(srcdir)/Include/internal _functoolsmodule.c # Tools for working with functions and callable objects
_operator _operator.c # operator.add() and similar goodies
_collections _collectionsmodule.c # Container types
_abc _abc.c # Abstract base classes
itertools itertoolsmodule.c # Functions creating iterators for efficient looping
atexit atexitmodule.c # Register functions to be run at interpreter-shutdown
-_signal -DPy_BUILD_CORE signalmodule.c
+_signal -DPy_BUILD_CORE -I$(srcdir)/Include/internal signalmodule.c
_stat _stat.c # stat.h interface
-time -DPy_BUILD_CORE timemodule.c # -lm # time operations and variables
-_thread -DPy_BUILD_CORE _threadmodule.c # low-level threading interface
+time -DPy_BUILD_CORE -I$(srcdir)/Include/internal timemodule.c # -lm # time operations and variables
+_thread -DPy_BUILD_CORE -I$(srcdir)/Include/internal _threadmodule.c # low-level threading interface
# access to ISO C locale support
_locale _localemodule.c # -lintl
# Standard I/O baseline
-_io -DPy_BUILD_CORE -I$(srcdir)/Modules/_io _io/_iomodule.c _io/iobase.c _io/fileio.c _io/bytesio.c _io/bufferedio.c _io/textio.c _io/stringio.c
+_io -DPy_BUILD_CORE -I$(srcdir)/Include/internal -I$(srcdir)/Modules/_io _io/_iomodule.c _io/iobase.c _io/fileio.c _io/bytesio.c _io/bufferedio.c _io/textio.c _io/stringio.c
# faulthandler module
faulthandler faulthandler.c
diff --git a/Modules/_functoolsmodule.c b/Modules/_functoolsmodule.c
index ff4172d663..6c28b274e5 100644
--- a/Modules/_functoolsmodule.c
+++ b/Modules/_functoolsmodule.c
@@ -1,7 +1,7 @@
#include "Python.h"
-#include "internal/mem.h"
-#include "internal/pystate.h"
+#include "pycore_mem.h"
+#include "pycore_state.h"
#include "structmember.h"
/* _functools module written and maintained
diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c
index 2eb5262f0f..24ae963b2b 100644
--- a/Modules/_io/bufferedio.c
+++ b/Modules/_io/bufferedio.c
@@ -9,7 +9,7 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "structmember.h"
#include "pythread.h"
#include "_iomodule.h"
diff --git a/Modules/_threadmodule.c b/Modules/_threadmodule.c
index d33fa99243..ad65188d7a 100644
--- a/Modules/_threadmodule.c
+++ b/Modules/_threadmodule.c
@@ -3,7 +3,7 @@
/* Interface to Sjoerd's portable C thread library */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "structmember.h" /* offsetof */
#include "pythread.h"
diff --git a/Modules/_xxsubinterpretersmodule.c b/Modules/_xxsubinterpretersmodule.c
index 2eb8787169..fb0b83add5 100644
--- a/Modules/_xxsubinterpretersmodule.c
+++ b/Modules/_xxsubinterpretersmodule.c
@@ -4,7 +4,7 @@
#include "Python.h"
#include "frameobject.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
static char *
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index 4773c79b53..a54be07b27 100644
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -24,9 +24,9 @@
*/
#include "Python.h"
-#include "internal/context.h"
-#include "internal/mem.h"
-#include "internal/pystate.h"
+#include "pycore_context.h"
+#include "pycore_mem.h"
+#include "pycore_state.h"
#include "frameobject.h" /* for PyFrame_ClearFreeList */
#include "pydtrace.h"
#include "pytime.h" /* for _PyTime_GetMonotonicClock() */
diff --git a/Modules/getpath.c b/Modules/getpath.c
index 521bc6e35e..53e5c2b889 100644
--- a/Modules/getpath.c
+++ b/Modules/getpath.c
@@ -1,7 +1,7 @@
/* Return the initial module search path. */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "osdefs.h"
#include <sys/types.h>
diff --git a/Modules/main.c b/Modules/main.c
index 6a8aa05fc3..1918f4f9b8 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -2,9 +2,9 @@
#include "Python.h"
#include "osdefs.h"
-#include "internal/mem.h"
-#include "internal/pygetopt.h"
-#include "internal/pystate.h"
+#include "pycore_mem.h"
+#include "pycore_getopt.h"
+#include "pycore_state.h"
#include <locale.h>
diff --git a/Modules/makesetup b/Modules/makesetup
index c7b0a60400..bf5ca3902b 100755
--- a/Modules/makesetup
+++ b/Modules/makesetup
@@ -110,7 +110,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
rulesf="@rules.$$"
trap 'rm -f $rulesf' 0 1 2 3
echo "
-# Rules appended by makedepend
+# Rules appended by makesetup
" >$rulesf
DEFS=
BUILT=
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 9ccdc8eff1..0307436e3d 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -32,7 +32,7 @@
#else
#include "winreparse.h"
#endif
-#include "internal/pystate.h"
+#include "pycore_state.h"
/* On android API level 21, 'AT_EACCESS' is not declared although
* HAVE_FACCESSAT is defined. */
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
index a81de6ab64..1915fd9be4 100644
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -4,7 +4,7 @@
/* XXX Signals should be recorded per thread, now we have thread state. */
#include "Python.h"
-#include "internal/pyatomic.h"
+#include "pycore_atomic.h"
#ifndef MS_WINDOWS
#include "posixmodule.h"
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 305910c358..be4758d945 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -1,7 +1,7 @@
/* Abstract Object Interface (many thanks to Jim Fulton) */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include <ctype.h>
#include "structmember.h" /* we need the offsetof() macro from there */
#include "longintrepr.h"
diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c
index 782e275697..7a0c340c80 100644
--- a/Objects/bytearrayobject.c
+++ b/Objects/bytearrayobject.c
@@ -2,8 +2,8 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
-#include "internal/mem.h"
-#include "internal/pystate.h"
+#include "pycore_mem.h"
+#include "pycore_state.h"
#include "structmember.h"
#include "bytes_methods.h"
#include "bytesobject.h"
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 1b36661c84..c912fc04fd 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -3,8 +3,8 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
-#include "internal/mem.h"
-#include "internal/pystate.h"
+#include "pycore_mem.h"
+#include "pycore_state.h"
#include "bytes_methods.h"
#include "pystrhex.h"
diff --git a/Objects/call.c b/Objects/call.c
index bda0573875..9061d0b1ac 100644
--- a/Objects/call.c
+++ b/Objects/call.c
@@ -1,5 +1,5 @@
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "frameobject.h"
diff --git a/Objects/cellobject.c b/Objects/cellobject.c
index 7b05e61ce4..0b390c78f0 100644
--- a/Objects/cellobject.c
+++ b/Objects/cellobject.c
@@ -1,8 +1,8 @@
/* Cell object implementation */
#include "Python.h"
-#include "internal/mem.h"
-#include "internal/pystate.h"
+#include "pycore_mem.h"
+#include "pycore_state.h"
PyObject *
PyCell_New(PyObject *obj)
diff --git a/Objects/classobject.c b/Objects/classobject.c
index c4efaf2820..93d1c67f1b 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -1,8 +1,8 @@
/* Class object implementation (dead now except for methods) */
#include "Python.h"
-#include "internal/mem.h"
-#include "internal/pystate.h"
+#include "pycore_mem.h"
+#include "pycore_state.h"
#include "structmember.h"
#define TP_DESCR_GET(t) ((t)->tp_descr_get)
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index cedf11ee8a..6d8e9ac154 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -3,7 +3,7 @@
#include "Python.h"
#include "code.h"
#include "structmember.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
/* Holder for co_extra information */
typedef struct {
diff --git a/Objects/descrobject.c b/Objects/descrobject.c
index 82afa8c63f..a23b97f396 100644
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -1,7 +1,7 @@
/* Descriptors -- a new, flexible way to describe attributes */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "structmember.h" /* Why is this not included in Python.h? */
/*[clinic input]
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 363d902e9c..a9ae907d9f 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -111,7 +111,7 @@ converting the dict to the combined table.
#define PyDict_MINSIZE 8
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "dict-common.h"
#include "stringlib/eq.h" /* to get unicode_eq() */
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index 6aa3d8f8e1..da79260ab3 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -6,8 +6,8 @@
#define PY_SSIZE_T_CLEAN
#include <Python.h>
-#include "internal/mem.h"
-#include "internal/pystate.h"
+#include "pycore_mem.h"
+#include "pycore_state.h"
#include "structmember.h"
#include "osdefs.h"
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 64ee386ddf..7704022dd2 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -1,7 +1,7 @@
/* Frame object implementation */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "code.h"
#include "frameobject.h"
diff --git a/Objects/funcobject.c b/Objects/funcobject.c
index c2f79c05db..e5278f09af 100644
--- a/Objects/funcobject.c
+++ b/Objects/funcobject.c
@@ -2,8 +2,8 @@
/* Function object implementation */
#include "Python.h"
-#include "internal/mem.h"
-#include "internal/pystate.h"
+#include "pycore_mem.h"
+#include "pycore_state.h"
#include "code.h"
#include "structmember.h"
diff --git a/Objects/genobject.c b/Objects/genobject.c
index 453b100330..885b3f2eca 100644
--- a/Objects/genobject.c
+++ b/Objects/genobject.c
@@ -1,7 +1,7 @@
/* Generator object implementation */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "frameobject.h"
#include "structmember.h"
#include "opcode.h"
diff --git a/Objects/iterobject.c b/Objects/iterobject.c
index 5f5ebfc8c0..23f0639db2 100644
--- a/Objects/iterobject.c
+++ b/Objects/iterobject.c
@@ -1,8 +1,8 @@
/* Iterator objects */
#include "Python.h"
-#include "internal/mem.h"
-#include "internal/pystate.h"
+#include "pycore_mem.h"
+#include "pycore_state.h"
typedef struct {
PyObject_HEAD
diff --git a/Objects/listobject.c b/Objects/listobject.c
index e85fa5c526..e38b21f2a3 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -1,7 +1,7 @@
/* List object implementation */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "accu.h"
#ifdef STDC_HEADERS
diff --git a/Objects/memoryobject.c b/Objects/memoryobject.c
index adaa67c064..f234bb4117 100644
--- a/Objects/memoryobject.c
+++ b/Objects/memoryobject.c
@@ -1,8 +1,8 @@
/* Memoryview object implementation */
#include "Python.h"
-#include "internal/mem.h"
-#include "internal/pystate.h"
+#include "pycore_mem.h"
+#include "pycore_state.h"
#include "pystrhex.h"
#include <stddef.h>
diff --git a/Objects/methodobject.c b/Objects/methodobject.c
index 9176e39234..b0bbfa2f5f 100644
--- a/Objects/methodobject.c
+++ b/Objects/methodobject.c
@@ -2,8 +2,8 @@
/* Method object implementation */
#include "Python.h"
-#include "internal/mem.h"
-#include "internal/pystate.h"
+#include "pycore_mem.h"
+#include "pycore_state.h"
#include "structmember.h"
/* Free list for method objects to safe malloc/free overhead
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c
index 5181941ee7..7fb711a1cb 100644
--- a/Objects/moduleobject.c
+++ b/Objects/moduleobject.c
@@ -2,7 +2,7 @@
/* Module object implementation */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "structmember.h"
static Py_ssize_t max_module_number;
diff --git a/Objects/object.c b/Objects/object.c
index b72ad019c7..f7395c783a 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -2,8 +2,8 @@
/* Generic object operations; and implementation of None */
#include "Python.h"
-#include "internal/pystate.h"
-#include "internal/context.h"
+#include "pycore_state.h"
+#include "pycore_context.h"
#include "frameobject.h"
#ifdef __cplusplus
diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c
index 88ded83a29..6a65a1572e 100644
--- a/Objects/obmalloc.c
+++ b/Objects/obmalloc.c
@@ -1,5 +1,5 @@
#include "Python.h"
-#include "internal/mem.h"
+#include "pycore_mem.h"
#include <stdbool.h>
diff --git a/Objects/odictobject.c b/Objects/odictobject.c
index 67c3674ee0..81c996be56 100644
--- a/Objects/odictobject.c
+++ b/Objects/odictobject.c
@@ -465,7 +465,7 @@ later:
*/
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "structmember.h"
#include "dict-common.h"
#include <stddef.h>
diff --git a/Objects/setobject.c b/Objects/setobject.c
index aa1f4eedbf..42fe80fc05 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -32,7 +32,7 @@
*/
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "structmember.h"
/* Object used as dummy key to fill deleted entries */
diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c
index 2288df5149..9f1cf78ced 100644
--- a/Objects/sliceobject.c
+++ b/Objects/sliceobject.c
@@ -14,8 +14,8 @@ this type and there is exactly one in existence.
*/
#include "Python.h"
-#include "internal/mem.h"
-#include "internal/pystate.h"
+#include "pycore_mem.h"
+#include "pycore_state.h"
#include "structmember.h"
static PyObject *
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 288f134811..cce266f7a2 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -2,7 +2,7 @@
/* Tuple object implementation */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "accu.h"
/*[clinic input]
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 722fe5f947..9a390b3e50 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -1,7 +1,7 @@
/* Type object implementation */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "frameobject.h"
#include "structmember.h"
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index f3f940ac9e..3692da6412 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -40,7 +40,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define PY_SSIZE_T_CLEAN
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "ucnhash.h"
#include "bytes_methods.h"
#include "stringlib/eq.h"
diff --git a/PC/getpathp.c b/PC/getpathp.c
index ada0289996..3a62738d23 100644
--- a/PC/getpathp.c
+++ b/PC/getpathp.c
@@ -80,7 +80,7 @@
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "osdefs.h"
#include <wchar.h>
diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props
index 95b349c077..cf85e1b25d 100644
--- a/PCbuild/pyproject.props
+++ b/PCbuild/pyproject.props
@@ -27,7 +27,7 @@
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
- <AdditionalIncludeDirectories>$(PySourcePath)Include;$(PySourcePath)PC;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(PySourcePath)Include;$(PySourcePath)Include\internal;$(PySourcePath)PC;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;$(_PlatformPreprocessorDefinition)$(_DebugPreprocessorDefinition)$(_PydPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Optimization>MaxSpeed</Optimization>
@@ -194,4 +194,4 @@ public override bool Execute() {
<Error Text="Unable to locate signtool.exe. Set /p:SignToolPath and rebuild" Condition="'$(_SignCommand)' == ''" />
<Exec Command='$(_SignCommand) "$(TargetPath)" || $(_SignCommand) "$(TargetPath)" || $(_SignCommand) "$(TargetPath)"' ContinueOnError="false" />
</Target>
-</Project> \ No newline at end of file
+</Project>
diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
index f65bb5b219..ebc35a7c00 100644
--- a/PCbuild/pythoncore.vcxproj
+++ b/PCbuild/pythoncore.vcxproj
@@ -112,15 +112,16 @@
<ClInclude Include="..\Include\graminit.h" />
<ClInclude Include="..\Include\grammar.h" />
<ClInclude Include="..\Include\import.h" />
- <ClInclude Include="..\Include\internal\ceval.h" />
- <ClInclude Include="..\Include\internal\condvar.h" />
- <ClInclude Include="..\Include\internal\context.h" />
- <ClInclude Include="..\Include\internal\gil.h" />
- <ClInclude Include="..\Include\internal\hamt.h" />
- <ClInclude Include="..\Include\internal\mem.h" />
- <ClInclude Include="..\Include\internal\pyatomic.h" />
- <ClInclude Include="..\Include\internal\pystate.h" />
- <ClInclude Include="..\Include\internal\warnings.h" />
+ <ClInclude Include="..\Include\internal\pycore_atomic.h" />
+ <ClInclude Include="..\Include\internal\pycore_ceval.h" />
+ <ClInclude Include="..\Include\internal\pycore_condvar.h" />
+ <ClInclude Include="..\Include\internal\pycore_context.h" />
+ <ClInclude Include="..\Include\internal\pycore_getopt.h" />
+ <ClInclude Include="..\Include\internal\pycore_gil.h" />
+ <ClInclude Include="..\Include\internal\pycore_hamt.h" />
+ <ClInclude Include="..\Include\internal\pycore_mem.h" />
+ <ClInclude Include="..\Include\internal\pycore_state.h" />
+ <ClInclude Include="..\Include\internal\pycore_warnings.h" />
<ClInclude Include="..\Include\intrcheck.h" />
<ClInclude Include="..\Include\iterobject.h" />
<ClInclude Include="..\Include\listobject.h" />
diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters
index 7fdadc8167..052c89cf80 100644
--- a/PCbuild/pythoncore.vcxproj.filters
+++ b/PCbuild/pythoncore.vcxproj.filters
@@ -135,31 +135,34 @@
<ClInclude Include="..\Include\import.h">
<Filter>Include</Filter>
</ClInclude>
- <ClInclude Include="..\Include\internal\ceval.h">
+ <ClInclude Include="..\Include\internal\pycore_atomic.h">
<Filter>Include</Filter>
</ClInclude>
- <ClInclude Include="..\Include\internal\condvar.h">
+ <ClInclude Include="..\Include\internal\pycore_ceval.h">
<Filter>Include</Filter>
</ClInclude>
- <ClInclude Include="..\Include\internal\context.h">
+ <ClInclude Include="..\Include\internal\pycore_condvar.h">
<Filter>Include</Filter>
</ClInclude>
- <ClInclude Include="..\Include\internal\gil.h">
+ <ClInclude Include="..\Include\internal\pycore_context.h">
<Filter>Include</Filter>
</ClInclude>
- <ClInclude Include="..\Include\internal\hamt.h">
+ <ClInclude Include="..\Include\internal\pycore_getopt.h">
<Filter>Include</Filter>
</ClInclude>
- <ClInclude Include="..\Include\internal\mem.h">
+ <ClInclude Include="..\Include\internal\pycore_gil.h">
<Filter>Include</Filter>
</ClInclude>
- <ClInclude Include="..\Include\internal\pyatomic.h">
+ <ClInclude Include="..\Include\internal\pycore_hamt.h">
<Filter>Include</Filter>
</ClInclude>
- <ClInclude Include="..\Include\internal\pystate.h">
+ <ClInclude Include="..\Include\internal\pycore_mem.h">
<Filter>Include</Filter>
</ClInclude>
- <ClInclude Include="..\Include\internal\warnings.h">
+ <ClInclude Include="..\Include\internal\pycore_state.h">
+ <Filter>Include</Filter>
+ </ClInclude>
+ <ClInclude Include="..\Include\internal\pycore_warnings.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\intrcheck.h">
@@ -249,9 +252,6 @@
<ClInclude Include="..\Include\pyfpe.h">
<Filter>Include</Filter>
</ClInclude>
- <ClInclude Include="..\Include\internal\pygetopt.h">
- <Filter>Include</Filter>
- </ClInclude>
<ClInclude Include="..\Include\pylifecycle.h">
<Filter>Include</Filter>
</ClInclude>
diff --git a/Parser/myreadline.c b/Parser/myreadline.c
index edb291a669..d18cf1b61b 100644
--- a/Parser/myreadline.c
+++ b/Parser/myreadline.c
@@ -10,7 +10,7 @@
*/
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#ifdef MS_WINDOWS
#define WIN32_LEAN_AND_MEAN
#include "windows.h"
diff --git a/Parser/pgenmain.c b/Parser/pgenmain.c
index 0a4b0c5da0..9e2159b347 100644
--- a/Parser/pgenmain.c
+++ b/Parser/pgenmain.c
@@ -16,8 +16,8 @@
#define PGEN
#include "Python.h"
-#include "internal/mem.h"
-#include "internal/pystate.h"
+#include "pycore_mem.h"
+#include "pycore_state.h"
#include "pgenheaders.h"
#include "grammar.h"
#include "node.h"
diff --git a/Python/_warnings.c b/Python/_warnings.c
index 8e1c01d0b2..619ec6f26b 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -1,5 +1,5 @@
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "frameobject.h"
#include "clinic/_warnings.c.h"
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 8001c60393..6c8672adfc 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -2,7 +2,7 @@
#include "Python.h"
#include "Python-ast.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "node.h"
#include "code.h"
diff --git a/Python/ceval.c b/Python/ceval.c
index 6443123848..5599b6efa3 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -10,7 +10,7 @@
#define PY_LOCAL_AGGRESSIVE
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "code.h"
#include "dictobject.h"
diff --git a/Python/ceval_gil.h b/Python/ceval_gil.h
index 4a054a97f7..f2d5fdba01 100644
--- a/Python/ceval_gil.h
+++ b/Python/ceval_gil.h
@@ -5,7 +5,7 @@
#include <stdlib.h>
#include <errno.h>
-#include "internal/pyatomic.h"
+#include "pycore_atomic.h"
/* First some general settings */
diff --git a/Python/codecs.c b/Python/codecs.c
index 4062429fe3..62bbee61c0 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -9,7 +9,7 @@ Copyright (c) Corporation for National Research Initiatives.
------------------------------------------------------------------------ */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "ucnhash.h"
#include <ctype.h>
diff --git a/Python/condvar.h b/Python/condvar.h
index 951b8ad47f..13517409ae 100644
--- a/Python/condvar.h
+++ b/Python/condvar.h
@@ -41,7 +41,7 @@
#define _CONDVAR_IMPL_H_
#include "Python.h"
-#include "internal/condvar.h"
+#include "pycore_condvar.h"
#ifdef _POSIX_THREADS
/*
diff --git a/Python/context.c b/Python/context.c
index 7344e968cc..b1f67b5aa7 100644
--- a/Python/context.c
+++ b/Python/context.c
@@ -1,9 +1,9 @@
#include "Python.h"
#include "structmember.h"
-#include "internal/pystate.h"
-#include "internal/context.h"
-#include "internal/hamt.h"
+#include "pycore_state.h"
+#include "pycore_context.h"
+#include "pycore_hamt.h"
#define CONTEXT_FREELIST_MAXLEN 255
diff --git a/Python/coreconfig.c b/Python/coreconfig.c
index 81086f42d6..ad14a8a457 100644
--- a/Python/coreconfig.c
+++ b/Python/coreconfig.c
@@ -1,6 +1,6 @@
#include "Python.h"
-#include "internal/mem.h"
-#include "internal/pystate.h"
+#include "pycore_mem.h"
+#include "pycore_state.h"
#include <locale.h>
#ifdef HAVE_LANGINFO_H
# include <langinfo.h>
diff --git a/Python/dynload_shlib.c b/Python/dynload_shlib.c
index 73ae26d131..9896560776 100644
--- a/Python/dynload_shlib.c
+++ b/Python/dynload_shlib.c
@@ -2,7 +2,7 @@
/* Support for dynamic loading of extension modules */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "importdl.h"
#include <sys/types.h>
diff --git a/Python/errors.c b/Python/errors.c
index 2926ea1918..14a70d9ce8 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -2,7 +2,7 @@
/* Error handling */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#ifndef __STDC__
#ifndef MS_WINDOWS
diff --git a/Python/frozenmain.c b/Python/frozenmain.c
index 86af2b6f94..9e90666658 100644
--- a/Python/frozenmain.c
+++ b/Python/frozenmain.c
@@ -2,7 +2,7 @@
/* Python interpreter main program for frozen scripts */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include <locale.h>
#ifdef MS_WINDOWS
diff --git a/Python/getopt.c b/Python/getopt.c
index e8d7e523c2..c165a94a2d 100644
--- a/Python/getopt.c
+++ b/Python/getopt.c
@@ -31,7 +31,7 @@
#include <stdio.h>
#include <string.h>
#include <wchar.h>
-#include "internal/pygetopt.h"
+#include "pycore_getopt.h"
#ifdef __cplusplus
extern "C" {
diff --git a/Python/hamt.c b/Python/hamt.c
index 562f777ea0..be3813b9aa 100644
--- a/Python/hamt.c
+++ b/Python/hamt.c
@@ -1,8 +1,8 @@
#include "Python.h"
#include "structmember.h"
-#include "internal/pystate.h"
-#include "internal/hamt.h"
+#include "pycore_state.h"
+#include "pycore_hamt.h"
/*
This file provides an implemention of an immutable mapping using the
diff --git a/Python/import.c b/Python/import.c
index 338cd302dc..18cd29df7e 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -4,9 +4,9 @@
#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 "pycore_hash.h"
+#include "pycore_mem.h"
+#include "pycore_state.h"
#include "errcode.h"
#include "marshal.h"
#include "code.h"
diff --git a/Python/pathconfig.c b/Python/pathconfig.c
index efccb8d6bb..04064159f8 100644
--- a/Python/pathconfig.c
+++ b/Python/pathconfig.c
@@ -2,8 +2,8 @@
#include "Python.h"
#include "osdefs.h"
-#include "internal/mem.h"
-#include "internal/pystate.h"
+#include "pycore_mem.h"
+#include "pycore_state.h"
#include <wchar.h>
#ifdef __cplusplus
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index fab96fd523..d349aaf6de 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -4,10 +4,10 @@
#include "Python-ast.h"
#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 "pycore_context.h"
+#include "pycore_hamt.h"
+#include "pycore_mem.h"
+#include "pycore_state.h"
#include "grammar.h"
#include "node.h"
#include "token.h"
diff --git a/Python/pystate.c b/Python/pystate.c
index 98e954d9d9..c77902a7f9 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -2,8 +2,8 @@
/* Thread and interpreter state structures and their interfaces */
#include "Python.h"
-#include "internal/mem.h"
-#include "internal/pystate.h"
+#include "pycore_mem.h"
+#include "pycore_state.h"
#define _PyThreadState_SET(value) \
_Py_atomic_store_relaxed(&_PyRuntime.gilstate.tstate_current, \
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 276c5d1028..2f61aab40d 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -12,7 +12,7 @@
#include "Python-ast.h"
#undef Yield /* undefine macro conflicting with winbase.h */
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "grammar.h"
#include "node.h"
#include "token.h"
diff --git a/Python/symtable.c b/Python/symtable.c
index dc934a556d..dae6fda0e4 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -1,5 +1,5 @@
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#ifdef Yield
#undef Yield /* undefine conflicting macro from winbase.h */
#endif
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 71414c9597..cb13e21c94 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -15,8 +15,8 @@ Data members:
*/
#include "Python.h"
-#include "internal/mem.h"
-#include "internal/pystate.h"
+#include "pycore_mem.h"
+#include "pycore_state.h"
#include "code.h"
#include "frameobject.h"
#include "pythread.h"
diff --git a/Python/thread.c b/Python/thread.c
index a1e1fa64f1..63553816b3 100644
--- a/Python/thread.c
+++ b/Python/thread.c
@@ -6,7 +6,7 @@
Stuff shared by all thread_*.h files is collected here. */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#ifndef _POSIX_THREADS
/* This means pthreads are not implemented in libc headers, hence the macro
diff --git a/Python/traceback.c b/Python/traceback.c
index 5b5c715a0f..e2070f08a5 100644
--- a/Python/traceback.c
+++ b/Python/traceback.c
@@ -2,7 +2,7 @@
/* Traceback implementation */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "code.h"
#include "frameobject.h"