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,5 +1,5 @@
#include "Python.h"
#include "internal/pystate.h"
#include "pycore_state.h"
#include "frameobject.h"
#include "clinic/_warnings.c.h"

View file

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

View file

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

View file

@ -5,7 +5,7 @@
#include <stdlib.h>
#include <errno.h>
#include "internal/pyatomic.h"
#include "pycore_atomic.h"
/* First some general settings */

View file

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

View file

@ -41,7 +41,7 @@
#define _CONDVAR_IMPL_H_
#include "Python.h"
#include "internal/condvar.h"
#include "pycore_condvar.h"
#ifdef _POSIX_THREADS
/*

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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