bpo-35081: Add pycore_ prefix to internal header files (GH-10263)

* Rename Include/internal/ header files:

  * pyatomic.h -> pycore_atomic.h
  * ceval.h -> pycore_ceval.h
  * condvar.h -> pycore_condvar.h
  * context.h -> pycore_context.h
  * pygetopt.h -> pycore_getopt.h
  * gil.h -> pycore_gil.h
  * hamt.h -> pycore_hamt.h
  * hash.h -> pycore_hash.h
  * mem.h -> pycore_mem.h
  * pystate.h -> pycore_state.h
  * warnings.h -> pycore_warnings.h

* PCbuild project, Makefile.pre.in, Modules/Setup: add the
  Include/internal/ directory to the search paths of header files.
* Update includes. For example, replace #include "internal/mem.h"
  with #include "pycore_mem.h".
This commit is contained in:
Victor Stinner 2018-11-01 00:52:28 +01:00 • committed by GitHub
parent 3a228ab17c
commit 27e2d1f219
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
78 changed files with 138 additions and 137 deletions

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -1,5 +1,5 @@
#include "Python.h"
#include "internal/pystate.h"
#include "pycore_state.h"
#include "frameobject.h"

View file

@ -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)

View file

@ -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)

View file

@ -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 {

View file

@ -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]

View file

@ -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() */

View file

@ -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"

View file

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

View file

@ -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"

View file

@ -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"

View file

@ -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

View file

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

View file

@ -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>

View file

@ -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

View file

@ -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;

View file

@ -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

View file

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

View file

@ -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>

View file

@ -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 */

View file

@ -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 *

View file

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

View file

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

View file

@ -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"