mirror of
https://github.com/python/cpython.git
synced 2025-07-15 23:35:23 +00: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,5 +1,5 @@
|
|||
#include "Python.h"
|
||||
#include "internal/pystate.h"
|
||||
#include "pycore_state.h"
|
||||
#include "frameobject.h"
|
||||
#include "clinic/_warnings.c.h"
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "Python.h"
|
||||
#include "Python-ast.h"
|
||||
#include "internal/pystate.h"
|
||||
#include "pycore_state.h"
|
||||
|
||||
#include "node.h"
|
||||
#include "code.h"
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#define PY_LOCAL_AGGRESSIVE
|
||||
|
||||
#include "Python.h"
|
||||
#include "internal/pystate.h"
|
||||
#include "pycore_state.h"
|
||||
|
||||
#include "code.h"
|
||||
#include "dictobject.h"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "internal/pyatomic.h"
|
||||
#include "pycore_atomic.h"
|
||||
|
||||
/* First some general settings */
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ Copyright (c) Corporation for National Research Initiatives.
|
|||
------------------------------------------------------------------------ */
|
||||
|
||||
#include "Python.h"
|
||||
#include "internal/pystate.h"
|
||||
#include "pycore_state.h"
|
||||
#include "ucnhash.h"
|
||||
#include <ctype.h>
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#define _CONDVAR_IMPL_H_
|
||||
|
||||
#include "Python.h"
|
||||
#include "internal/condvar.h"
|
||||
#include "pycore_condvar.h"
|
||||
|
||||
#ifdef _POSIX_THREADS
|
||||
/*
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#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>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/* 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>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/* Error handling */
|
||||
|
||||
#include "Python.h"
|
||||
#include "internal/pystate.h"
|
||||
#include "pycore_state.h"
|
||||
|
||||
#ifndef __STDC__
|
||||
#ifndef MS_WINDOWS
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/* Python interpreter main program for frozen scripts */
|
||||
|
||||
#include "Python.h"
|
||||
#include "internal/pystate.h"
|
||||
#include "pycore_state.h"
|
||||
#include <locale.h>
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include "internal/pygetopt.h"
|
||||
#include "pycore_getopt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#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
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
#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"
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#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
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
#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"
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
/* 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, \
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
#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"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "Python.h"
|
||||
#include "internal/pystate.h"
|
||||
#include "pycore_state.h"
|
||||
#ifdef Yield
|
||||
#undef Yield /* undefine conflicting macro from winbase.h */
|
||||
#endif
|
||||
|
|
|
@ -15,8 +15,8 @@ Data members:
|
|||
*/
|
||||
|
||||
#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"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/* Traceback implementation */
|
||||
|
||||
#include "Python.h"
|
||||
#include "internal/pystate.h"
|
||||
#include "pycore_state.h"
|
||||
|
||||
#include "code.h"
|
||||
#include "frameobject.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue