Skip to content

bpo-35081: Rename internal headers #10275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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"


Expand Down
2 changes: 1 addition & 1 deletion Include/pystate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 6 additions & 3 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions Modules/_functoolsmodule.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion Modules/_io/bufferedio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion Modules/_threadmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion Modules/_xxsubinterpretersmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "Python.h"
#include "frameobject.h"
#include "pycore_state.h"
#include "pycore_pystate.h"


static char *
Expand Down
4 changes: 2 additions & 2 deletions Modules/gcmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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() */
Expand Down
2 changes: 1 addition & 1 deletion Modules/getpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
6 changes: 3 additions & 3 deletions Modules/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
2 changes: 1 addition & 1 deletion Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion Objects/abstract.c
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions Objects/bytearrayobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions Objects/bytesobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion Objects/call.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "frameobject.h"


Expand Down
4 changes: 2 additions & 2 deletions Objects/cellobject.c
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 2 additions & 2 deletions Objects/classobject.c
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Objects/codeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion Objects/descrobject.c
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
2 changes: 1 addition & 1 deletion Objects/dictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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() */

Expand Down
4 changes: 2 additions & 2 deletions Objects/exceptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion Objects/frameobject.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* Frame object implementation */

#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"

#include "code.h"
#include "frameobject.h"
Expand Down
4 changes: 2 additions & 2 deletions Objects/funcobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion Objects/genobject.c
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions Objects/iterobject.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion Objects/listobject.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions Objects/memoryobject.c
Original file line number Diff line number Diff line change
@@ -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>

Expand Down
4 changes: 2 additions & 2 deletions Objects/methodobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Objects/moduleobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Objects/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion Objects/obmalloc.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Python.h"
#include "pycore_mem.h"
#include "pycore_pymem.h"

#include <stdbool.h>

Expand Down
2 changes: 1 addition & 1 deletion Objects/odictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ Potential Optimizations
*/

#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "structmember.h"
#include "dict-common.h"
#include <stddef.h>
Expand Down
2 changes: 1 addition & 1 deletion Objects/setobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
4 changes: 2 additions & 2 deletions Objects/sliceobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down
2 changes: 1 addition & 1 deletion Objects/tupleobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* Tuple object implementation */

#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "pycore_accu.h"

/*[clinic input]
Expand Down
2 changes: 1 addition & 1 deletion Objects/typeobject.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* Type object implementation */

#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "frameobject.h"
#include "structmember.h"

Expand Down
2 changes: 1 addition & 1 deletion Objects/unicodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion PC/getpathp.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@


#include "Python.h"
#include "pycore_state.h"
#include "pycore_pystate.h"
#include "osdefs.h"
#include <wchar.h>

Expand Down
7 changes: 4 additions & 3 deletions PCbuild/pythoncore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
Loading