mirror of
https://github.com/python/cpython
synced 2026-09-29 11:35:29 +03:00
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:
parent
3a228ab17c
commit
27e2d1f219
78 changed files with 138 additions and 137 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "Python.h"
|
||||
#include "internal/pystate.h"
|
||||
#include "pycore_state.h"
|
||||
#include "frameobject.h"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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() */
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* Frame object implementation */
|
||||
|
||||
#include "Python.h"
|
||||
#include "internal/pystate.h"
|
||||
#include "pycore_state.h"
|
||||
|
||||
#include "code.h"
|
||||
#include "frameobject.h"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* List object implementation */
|
||||
|
||||
#include "Python.h"
|
||||
#include "internal/pystate.h"
|
||||
#include "pycore_state.h"
|
||||
#include "accu.h"
|
||||
|
||||
#ifdef STDC_HEADERS
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "Python.h"
|
||||
#include "internal/mem.h"
|
||||
#include "pycore_mem.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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 *
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* Tuple object implementation */
|
||||
|
||||
#include "Python.h"
|
||||
#include "internal/pystate.h"
|
||||
#include "pycore_state.h"
|
||||
#include "accu.h"
|
||||
|
||||
/*[clinic input]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/* Type object implementation */
|
||||
|
||||
#include "Python.h"
|
||||
#include "internal/pystate.h"
|
||||
#include "pycore_state.h"
|
||||
#include "frameobject.h"
|
||||
#include "structmember.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue