diff --git a/Include/internal/pyatomic.h b/Include/internal/pycore_atomic.h similarity index 100% rename from Include/internal/pyatomic.h rename to Include/internal/pycore_atomic.h diff --git a/Include/internal/ceval.h b/Include/internal/pycore_ceval.h similarity index 96% rename from Include/internal/ceval.h rename to Include/internal/pycore_ceval.h index 4297b5a51ce..ddeeb5c4256 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 similarity index 100% rename from Include/internal/condvar.h rename to Include/internal/pycore_condvar.h diff --git a/Include/internal/context.h b/Include/internal/pycore_context.h similarity index 96% rename from Include/internal/context.h rename to Include/internal/pycore_context.h index 59f88f2614e..57a410c06f6 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 similarity index 100% rename from Include/internal/pygetopt.h rename to Include/internal/pycore_getopt.h diff --git a/Include/internal/gil.h b/Include/internal/pycore_gil.h similarity index 95% rename from Include/internal/gil.h rename to Include/internal/pycore_gil.h index 7743b3f0aa8..5059850d76f 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 similarity index 100% rename from Include/internal/hamt.h rename to Include/internal/pycore_hamt.h diff --git a/Include/internal/hash.h b/Include/internal/pycore_hash.h similarity index 100% rename from Include/internal/hash.h rename to Include/internal/pycore_hash.h diff --git a/Include/internal/mem.h b/Include/internal/pycore_mem.h similarity index 100% rename from Include/internal/mem.h rename to Include/internal/pycore_mem.h diff --git a/Include/internal/pystate.h b/Include/internal/pycore_state.h similarity index 98% rename from Include/internal/pystate.h rename to Include/internal/pycore_state.h index 38845d32eca..ff25d2ebf44 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 similarity index 100% rename from Include/internal/warnings.h rename to Include/internal/pycore_warnings.h diff --git a/Include/pystate.h b/Include/pystate.h index 8860f124002..7fc921e9ac7 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 232025f1cb6..0336290dd84 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 fb16698d2fc..c1804630b90 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 ff4172d663b..6c28b274e56 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 2eb5262f0f7..24ae963b2b8 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 d33fa992430..ad65188d7a4 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 2eb87871694..fb0b83add5f 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 4773c79b532..a54be07b27a 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 521bc6e35ed..53e5c2b889a 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 diff --git a/Modules/main.c b/Modules/main.c index 6a8aa05fc37..1918f4f9b8f 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 diff --git a/Modules/makesetup b/Modules/makesetup index c7b0a60400c..bf5ca3902b5 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 9ccdc8eff1b..0307436e3d5 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 a81de6ab646..1915fd9be45 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 305910c3584..be4758d9451 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 #include "structmember.h" /* we need the offsetof() macro from there */ #include "longintrepr.h" diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c index 782e2756978..7a0c340c804 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 1b36661c84d..c912fc04fd4 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 bda05738755..9061d0b1ac3 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 7b05e61ce46..0b390c78f04 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 c4efaf28202..93d1c67f1b4 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 cedf11ee8af..6d8e9ac154e 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 82afa8c63f8..a23b97f396f 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 363d902e9c5..a9ae907d9f2 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 6aa3d8f8e19..da79260ab3b 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -6,8 +6,8 @@ #define PY_SSIZE_T_CLEAN #include -#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 64ee386ddf9..7704022dd2e 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 c2f79c05dbb..e5278f09af2 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 453b1003300..885b3f2eca7 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 5f5ebfc8c0e..23f0639db2f 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 e85fa5c5263..e38b21f2a30 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 adaa67c0644..f234bb4117d 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 diff --git a/Objects/methodobject.c b/Objects/methodobject.c index 9176e39234f..b0bbfa2f5f9 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 5181941ee7b..7fb711a1cb0 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 b72ad019c79..f7395c783ae 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 88ded83a29e..6a65a1572e8 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 diff --git a/Objects/odictobject.c b/Objects/odictobject.c index 67c3674ee09..81c996be561 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 diff --git a/Objects/setobject.c b/Objects/setobject.c index aa1f4eedbfd..42fe80fc050 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 2288df51495..9f1cf78cedd 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 288f1348117..cce266f7a2d 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 722fe5f9473..9a390b3e507 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 f3f940ac9ef..3692da64122 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 ada02899966..3a62738d233 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 diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props index 95b349c077e..cf85e1b25d5 100644 --- a/PCbuild/pyproject.props +++ b/PCbuild/pyproject.props @@ -27,7 +27,7 @@ - $(PySourcePath)Include;$(PySourcePath)PC;$(IntDir);%(AdditionalIncludeDirectories) + $(PySourcePath)Include;$(PySourcePath)Include\internal;$(PySourcePath)PC;$(IntDir);%(AdditionalIncludeDirectories) WIN32;$(_PlatformPreprocessorDefinition)$(_DebugPreprocessorDefinition)$(_PydPreprocessorDefinition)%(PreprocessorDefinitions) MaxSpeed @@ -194,4 +194,4 @@ public override bool Execute() { - \ No newline at end of file + diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj index f65bb5b2197..ebc35a7c004 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -112,15 +112,16 @@ - - - - - - - - - + + + + + + + + + + diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters index 7fdadc81676..052c89cf806 100644 --- a/PCbuild/pythoncore.vcxproj.filters +++ b/PCbuild/pythoncore.vcxproj.filters @@ -135,31 +135,34 @@ Include - + Include - + Include - + Include - + Include - + Include - + Include - + Include - + Include - + + Include + + Include @@ -249,9 +252,6 @@ Include - - Include - Include diff --git a/Parser/myreadline.c b/Parser/myreadline.c index edb291a6691..d18cf1b61ba 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 0a4b0c5da02..9e2159b3475 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 8e1c01d0b29..619ec6f26b4 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 8001c603939..6c8672adfc1 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 64431238484..5599b6efa3e 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 4a054a97f71..f2d5fdba015 100644 --- a/Python/ceval_gil.h +++ b/Python/ceval_gil.h @@ -5,7 +5,7 @@ #include #include -#include "internal/pyatomic.h" +#include "pycore_atomic.h" /* First some general settings */ diff --git a/Python/codecs.c b/Python/codecs.c index 4062429fe35..62bbee61c0a 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 diff --git a/Python/condvar.h b/Python/condvar.h index 951b8ad47f0..13517409aea 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 7344e968cce..b1f67b5aa75 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 81086f42d67..ad14a8a457d 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 #ifdef HAVE_LANGINFO_H # include diff --git a/Python/dynload_shlib.c b/Python/dynload_shlib.c index 73ae26d1314..98965607761 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 diff --git a/Python/errors.c b/Python/errors.c index 2926ea1918e..14a70d9ce8e 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 86af2b6f94c..9e906666586 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 #ifdef MS_WINDOWS diff --git a/Python/getopt.c b/Python/getopt.c index e8d7e523c2e..c165a94a2d8 100644 --- a/Python/getopt.c +++ b/Python/getopt.c @@ -31,7 +31,7 @@ #include #include #include -#include "internal/pygetopt.h" +#include "pycore_getopt.h" #ifdef __cplusplus extern "C" { diff --git a/Python/hamt.c b/Python/hamt.c index 562f777ea0b..be3813b9aab 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 338cd302dcc..18cd29df7e9 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 efccb8d6bb8..04064159f86 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 #ifdef __cplusplus diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index fab96fd5238..d349aaf6dec 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 98e954d9d91..c77902a7f9c 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 276c5d10285..2f61aab40d9 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 dc934a556da..dae6fda0e4c 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 71414c95978..cb13e21c940 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 a1e1fa64f12..63553816b35 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 5b5c715a0f4..e2070f08a5a 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"