extern "C" {
#endif
-#include "internal/pyatomic.h"
+#include "pycore_atomic.h"
#include "pythread.h"
struct _pending_calls {
int last;
};
-#include "internal/gil.h"
+#include "pycore_gil.h"
struct _ceval_runtime_state {
int recursion_limit;
#define Py_INTERNAL_CONTEXT_H
-#include "internal/hamt.h"
+#include "pycore_hamt.h"
struct _pycontextobject {
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!
#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 */
#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
# 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
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)
# 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
#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
#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"
/* 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"
#include "Python.h"
#include "frameobject.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
static char *
*/
#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() */
/* Return the initial module search path. */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "osdefs.h"
#include <sys/types.h>
#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>
rulesf="@rules.$$"
trap 'rm -f $rulesf' 0 1 2 3
echo "
-# Rules appended by makedepend
+# Rules appended by makesetup
" >$rulesf
DEFS=
BUILT=
#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. */
/* 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"
/* 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"
#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"
#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"
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "frameobject.h"
/* 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)
/* 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)
#include "Python.h"
#include "code.h"
#include "structmember.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
/* Holder for co_extra information */
typedef struct {
/* 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]
#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() */
#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"
/* Frame object implementation */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "code.h"
#include "frameobject.h"
/* 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"
/* Generator object implementation */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "frameobject.h"
#include "structmember.h"
#include "opcode.h"
/* 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
/* List object implementation */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "accu.h"
#ifdef STDC_HEADERS
/* 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>
/* 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
/* Module object implementation */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "structmember.h"
static Py_ssize_t max_module_number;
/* 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
#include "Python.h"
-#include "internal/mem.h"
+#include "pycore_mem.h"
#include <stdbool.h>
*/
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "structmember.h"
#include "dict-common.h"
#include <stddef.h>
*/
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "structmember.h"
/* Object used as dummy key to fill deleted entries */
*/
#include "Python.h"
-#include "internal/mem.h"
-#include "internal/pystate.h"
+#include "pycore_mem.h"
+#include "pycore_state.h"
#include "structmember.h"
static PyObject *
/* Tuple object implementation */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "accu.h"
/*[clinic input]
/* Type object implementation */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "frameobject.h"
#include "structmember.h"
#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"
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "osdefs.h"
#include <wchar.h>
</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>
<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>
<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" />
<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">
<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>
*/
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#ifdef MS_WINDOWS
#define WIN32_LEAN_AND_MEAN
#include "windows.h"
#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"
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "frameobject.h"
#include "clinic/_warnings.c.h"
#include "Python.h"
#include "Python-ast.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "node.h"
#include "code.h"
#define PY_LOCAL_AGGRESSIVE
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "code.h"
#include "dictobject.h"
#include <stdlib.h>
#include <errno.h>
-#include "internal/pyatomic.h"
+#include "pycore_atomic.h"
/* First some general settings */
------------------------------------------------------------------------ */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "ucnhash.h"
#include <ctype.h>
#define _CONDVAR_IMPL_H_
#include "Python.h"
-#include "internal/condvar.h"
+#include "pycore_condvar.h"
#ifdef _POSIX_THREADS
/*
#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
#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>
/* 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>
/* Error handling */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#ifndef __STDC__
#ifndef MS_WINDOWS
/* Python interpreter main program for frozen scripts */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include <locale.h>
#ifdef MS_WINDOWS
#include <stdio.h>
#include <string.h>
#include <wchar.h>
-#include "internal/pygetopt.h"
+#include "pycore_getopt.h"
#ifdef __cplusplus
extern "C" {
#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
#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"
#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
#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"
/* 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, \
#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"
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#ifdef Yield
#undef Yield /* undefine conflicting macro from winbase.h */
#endif
*/
#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"
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
/* Traceback implementation */
#include "Python.h"
-#include "internal/pystate.h"
+#include "pycore_state.h"
#include "code.h"
#include "frameobject.h"