bpo-35081: Rename internal headers (GH-10275)

Rename Include/internal/ headers:

* pycore_hash.h -> pycore_pyhash.h
* pycore_lifecycle.h -> pycore_pylifecycle.h
* pycore_mem.h -> pycore_pymem.h
* pycore_state.h -> pycore_pystate.h

Add missing headers to Makefile.pre.in and PCbuild:

* pycore_condvar.h.
* pycore_hamt.h
* pycore_pyhash.h
This commit is contained in:
Victor Stinner 2018-11-12 16:53:38 +01:00 committed by GitHub
parent 19c46a4c96
commit 621cebe81b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
65 changed files with 105 additions and 98 deletions

View File

@ -12,8 +12,8 @@ extern "C" {
#include "pythread.h"
#include "pycore_ceval.h"
#include "pycore_mem.h"
#include "pycore_pathconfig.h"
#include "pycore_pymem.h"
#include "pycore_warnings.h"

View File

@ -301,7 +301,7 @@ PyAPI_FUNC(PyThreadState *) PyThreadState_Get(void);
/* Get the current Python thread state.
Macro using PyThreadState_Get() or _PyThreadState_GET() depending if
pycore_state.h is included or not (this header redefines the macro).
pycore_pystate.h is included or not (this header redefines the macro).
If PyThreadState_Get() is used, issue a fatal error if the current thread
state is NULL.

View File

@ -1027,13 +1027,16 @@ PYTHON_HEADERS= \
$(srcdir)/Include/internal/pycore_accu.h \
$(srcdir)/Include/internal/pycore_atomic.h \
$(srcdir)/Include/internal/pycore_ceval.h \
$(srcdir)/Include/internal/pycore_condvar.h \
$(srcdir)/Include/internal/pycore_context.h \
$(srcdir)/Include/internal/pycore_getopt.h \
$(srcdir)/Include/internal/pycore_gil.h \
$(srcdir)/Include/internal/pycore_lifecycle.h \
$(srcdir)/Include/internal/pycore_mem.h \
$(srcdir)/Include/internal/pycore_hamt.h \
$(srcdir)/Include/internal/pycore_pathconfig.h \
$(srcdir)/Include/internal/pycore_state.h \
$(srcdir)/Include/internal/pycore_pyhash.h \
$(srcdir)/Include/internal/pycore_pylifecycle.h \
$(srcdir)/Include/internal/pycore_pymem.h \
$(srcdir)/Include/internal/pycore_pystate.h \
$(srcdir)/Include/internal/pycore_warnings.h \
$(DTRACE_HEADERS)

View File

@ -1,7 +1,7 @@
#include "Python.h"
#include "pycore_mem.h"
#include "pycore_state.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "structmember.h"
/* _functools module written and maintained

View File

@ -9,7 +9,7 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "structmember.h"
#include "pythread.h"
#include "_iomodule.h"

View File

@ -3,7 +3,7 @@
/* Interface to Sjoerd's portable C thread library */
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "structmember.h" /* offsetof */
#include "pythread.h"

View File

@ -4,7 +4,7 @@
#include "Python.h"
#include "frameobject.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
static char *

View File

@ -25,8 +25,8 @@
#include "Python.h"
#include "pycore_context.h"
#include "pycore_mem.h"
#include "pycore_state.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "frameobject.h" /* for PyFrame_ClearFreeList */
#include "pydtrace.h"
#include "pytime.h" /* for _PyTime_GetMonotonicClock() */

View File

@ -4,7 +4,7 @@
#include "osdefs.h"
#include "pycore_fileutils.h"
#include "pycore_pathconfig.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include <sys/types.h>
#include <string.h>

View File

@ -3,10 +3,10 @@
#include "Python.h"
#include "osdefs.h"
#include "pycore_getopt.h"
#include "pycore_lifecycle.h"
#include "pycore_mem.h"
#include "pycore_pathconfig.h"
#include "pycore_state.h"
#include "pycore_pylifecycle.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include <locale.h>

View File

@ -32,7 +32,7 @@
#else
#include "winreparse.h"
#endif
#include "pycore_state.h"
#include "pycore_pystate.h"
/* On android API level 21, 'AT_EACCESS' is not declared although
* HAVE_FACCESSAT is defined. */

View File

@ -1,7 +1,7 @@
/* Abstract Object Interface (many thanks to Jim Fulton) */
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include <ctype.h>
#include "structmember.h" /* we need the offsetof() macro from there */
#include "longintrepr.h"

View File

@ -2,8 +2,8 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "pycore_mem.h"
#include "pycore_state.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "structmember.h"
#include "bytes_methods.h"
#include "bytesobject.h"

View File

@ -3,8 +3,8 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "pycore_mem.h"
#include "pycore_state.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "bytes_methods.h"
#include "pystrhex.h"

View File

@ -1,5 +1,5 @@
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "frameobject.h"

View File

@ -1,8 +1,8 @@
/* Cell object implementation */
#include "Python.h"
#include "pycore_mem.h"
#include "pycore_state.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
PyObject *
PyCell_New(PyObject *obj)

View File

@ -1,8 +1,8 @@
/* Class object implementation (dead now except for methods) */
#include "Python.h"
#include "pycore_mem.h"
#include "pycore_state.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "structmember.h"
#define TP_DESCR_GET(t) ((t)->tp_descr_get)

View File

@ -3,7 +3,7 @@
#include "Python.h"
#include "code.h"
#include "structmember.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
/* Holder for co_extra information */
typedef struct {

View File

@ -1,7 +1,7 @@
/* Descriptors -- a new, flexible way to describe attributes */
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "structmember.h" /* Why is this not included in Python.h? */
/*[clinic input]

View File

@ -111,7 +111,7 @@ converting the dict to the combined table.
#define PyDict_MINSIZE 8
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "dict-common.h"
#include "stringlib/eq.h" /* to get unicode_eq() */

View File

@ -6,8 +6,8 @@
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include "pycore_mem.h"
#include "pycore_state.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "structmember.h"
#include "osdefs.h"

View File

@ -1,7 +1,7 @@
/* Frame object implementation */
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "code.h"
#include "frameobject.h"

View File

@ -2,8 +2,8 @@
/* Function object implementation */
#include "Python.h"
#include "pycore_mem.h"
#include "pycore_state.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "code.h"
#include "structmember.h"

View File

@ -1,7 +1,7 @@
/* Generator object implementation */
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "frameobject.h"
#include "structmember.h"
#include "opcode.h"

View File

@ -1,8 +1,8 @@
/* Iterator objects */
#include "Python.h"
#include "pycore_mem.h"
#include "pycore_state.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
typedef struct {
PyObject_HEAD

View File

@ -1,7 +1,7 @@
/* List object implementation */
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "pycore_accu.h"
#ifdef STDC_HEADERS

View File

@ -1,8 +1,8 @@
/* Memoryview object implementation */
#include "Python.h"
#include "pycore_mem.h"
#include "pycore_state.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "pystrhex.h"
#include <stddef.h>

View File

@ -2,8 +2,8 @@
/* Method object implementation */
#include "Python.h"
#include "pycore_mem.h"
#include "pycore_state.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "structmember.h"
/* Free list for method objects to safe malloc/free overhead

View File

@ -2,7 +2,7 @@
/* Module object implementation */
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "structmember.h"
static Py_ssize_t max_module_number;

View File

@ -2,7 +2,7 @@
/* Generic object operations; and implementation of None */
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "pycore_context.h"
#include "frameobject.h"

View File

@ -1,5 +1,5 @@
#include "Python.h"
#include "pycore_mem.h"
#include "pycore_pymem.h"
#include <stdbool.h>

View File

@ -465,7 +465,7 @@ later:
*/
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "structmember.h"
#include "dict-common.h"
#include <stddef.h>

View File

@ -32,7 +32,7 @@
*/
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "structmember.h"
/* Object used as dummy key to fill deleted entries */

View File

@ -14,8 +14,8 @@ this type and there is exactly one in existence.
*/
#include "Python.h"
#include "pycore_mem.h"
#include "pycore_state.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "structmember.h"
static PyObject *

View File

@ -2,7 +2,7 @@
/* Tuple object implementation */
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "pycore_accu.h"
/*[clinic input]

View File

@ -1,7 +1,7 @@
/* Type object implementation */
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "frameobject.h"
#include "structmember.h"

View File

@ -41,7 +41,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "pycore_fileutils.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "ucnhash.h"
#include "bytes_methods.h"
#include "stringlib/eq.h"

View File

@ -80,7 +80,7 @@
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "osdefs.h"
#include <wchar.h>

View File

@ -119,10 +119,11 @@
<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_lifecycle.h" />
<ClInclude Include="..\Include\internal\pycore_mem.h" />
<ClInclude Include="..\Include\internal\pycore_pathconfig.h" />
<ClInclude Include="..\Include\internal\pycore_state.h" />
<ClInclude Include="..\Include\internal\pycore_pyhash.h" />
<ClInclude Include="..\Include\internal\pycore_pylifecycle.h" />
<ClInclude Include="..\Include\internal\pycore_pymem.h" />
<ClInclude Include="..\Include\internal\pycore_pystate.h" />
<ClInclude Include="..\Include\internal\pycore_warnings.h" />
<ClInclude Include="..\Include\intrcheck.h" />
<ClInclude Include="..\Include\iterobject.h" />

View File

@ -156,16 +156,19 @@
<ClInclude Include="..\Include\internal\pycore_hamt.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pycore_lifecycle.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pycore_mem.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pycore_pathconfig.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pycore_state.h">
<ClInclude Include="..\Include\internal\pycore_pyhash.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pycore_pylifecycle.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pycore_pymem.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pycore_pystate.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pycore_warnings.h">

View File

@ -10,7 +10,7 @@
*/
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#ifdef MS_WINDOWS
#define WIN32_LEAN_AND_MEAN
#include "windows.h"

View File

@ -16,8 +16,8 @@
#define PGEN
#include "Python.h"
#include "pycore_mem.h"
#include "pycore_state.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "pgenheaders.h"
#include "grammar.h"
#include "node.h"

View File

@ -1,7 +1,7 @@
/* Minimal main program -- everything is loaded from the library */
#include "Python.h"
#include "pycore_lifecycle.h"
#include "pycore_pylifecycle.h"
#ifdef MS_WINDOWS
int

View File

@ -1,5 +1,5 @@
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "frameobject.h"
#include "clinic/_warnings.c.h"

View File

@ -3,7 +3,7 @@
#include "Python.h"
#include <ctype.h>
#include "ast.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
_Py_IDENTIFIER(__builtins__);
_Py_IDENTIFIER(__dict__);

View File

@ -10,7 +10,7 @@
#define PY_LOCAL_AGGRESSIVE
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "code.h"
#include "dictobject.h"

View File

@ -9,7 +9,7 @@ Copyright (c) Corporation for National Research Initiatives.
------------------------------------------------------------------------ */
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "ucnhash.h"
#include <ctype.h>

View File

@ -1,7 +1,7 @@
#include "Python.h"
#include "structmember.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "pycore_context.h"
#include "pycore_hamt.h"

View File

@ -1,9 +1,9 @@
#include "Python.h"
#include "pycore_fileutils.h"
#include "pycore_lifecycle.h"
#include "pycore_mem.h"
#include "pycore_pylifecycle.h"
#include "pycore_pymem.h"
#include "pycore_pathconfig.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include <locale.h>
#ifdef HAVE_LANGINFO_H
# include <langinfo.h>

View File

@ -2,7 +2,7 @@
/* Support for dynamic loading of extension modules */
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "importdl.h"
#include <sys/types.h>

View File

@ -2,7 +2,7 @@
/* Error handling */
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#ifndef __STDC__
#ifndef MS_WINDOWS

View File

@ -2,7 +2,7 @@
/* Python interpreter main program for frozen scripts */
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include <locale.h>
#ifdef MS_WINDOWS

View File

@ -1,7 +1,7 @@
#include "Python.h"
#include "structmember.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "pycore_hamt.h"
/*

View File

@ -3,10 +3,10 @@
#include "Python.h"
#include "Python-ast.h"
#include "pycore_hash.h"
#include "pycore_lifecycle.h"
#include "pycore_mem.h"
#include "pycore_state.h"
#include "pycore_pyhash.h"
#include "pycore_pylifecycle.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "errcode.h"
#include "marshal.h"
#include "code.h"

View File

@ -2,10 +2,10 @@
#include "Python.h"
#include "osdefs.h"
#include "pycore_mem.h"
#include "pycore_fileutils.h"
#include "pycore_pathconfig.h"
#include "pycore_state.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include <wchar.h>
#ifdef __cplusplus

View File

@ -5,10 +5,10 @@
#include "Python-ast.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 "pycore_pylifecycle.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "grammar.h"
#include "node.h"
#include "token.h"

View File

@ -2,8 +2,8 @@
/* Thread and interpreter state structures and their interfaces */
#include "Python.h"
#include "pycore_mem.h"
#include "pycore_state.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#define _PyThreadState_SET(value) \
_Py_atomic_store_relaxed(&_PyRuntime.gilstate.tstate_current, \

View File

@ -11,7 +11,7 @@
#include "Python.h"
#include "Python-ast.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "grammar.h"
#include "node.h"
#include "token.h"

View File

@ -1,5 +1,5 @@
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "symtable.h"
#include "structmember.h"

View File

@ -17,10 +17,10 @@ Data members:
#include "Python.h"
#include "code.h"
#include "frameobject.h"
#include "pycore_lifecycle.h"
#include "pycore_mem.h"
#include "pycore_pylifecycle.h"
#include "pycore_pymem.h"
#include "pycore_pathconfig.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "pythread.h"
#include "osdefs.h"

View File

@ -6,7 +6,7 @@
Stuff shared by all thread_*.h files is collected here. */
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#ifndef _POSIX_THREADS
/* This means pthreads are not implemented in libc headers, hence the macro

View File

@ -2,7 +2,7 @@
/* Traceback implementation */
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "code.h"
#include "frameobject.h"