bpo-40268: Remove explicit pythread.h includes (#19529)
Remove explicit pythread.h includes: it is always included by Python.h.
This commit is contained in:
parent
d01628e411
commit
62183b8d6d
|
@ -131,6 +131,7 @@
|
||||||
#include "pyerrors.h"
|
#include "pyerrors.h"
|
||||||
|
|
||||||
#include "cpython/initconfig.h"
|
#include "cpython/initconfig.h"
|
||||||
|
#include "pythread.h"
|
||||||
#include "pystate.h"
|
#include "pystate.h"
|
||||||
#include "context.h"
|
#include "context.h"
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "pythread.h"
|
|
||||||
|
|
||||||
/* This limitation is for performance and simplicity. If needed it can be
|
/* This limitation is for performance and simplicity. If needed it can be
|
||||||
removed (with effort). */
|
removed (with effort). */
|
||||||
#define MAX_CO_EXTRA_USERS 255
|
#define MAX_CO_EXTRA_USERS 255
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "pystrhex.h"
|
#include "pystrhex.h"
|
||||||
#include "pythread.h"
|
|
||||||
|
|
||||||
#include "../hashlib.h"
|
#include "../hashlib.h"
|
||||||
#include "blake2ns.h"
|
#include "blake2ns.h"
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "pystrhex.h"
|
#include "pystrhex.h"
|
||||||
#include "pythread.h"
|
|
||||||
|
|
||||||
#include "../hashlib.h"
|
#include "../hashlib.h"
|
||||||
#include "blake2ns.h"
|
#include "blake2ns.h"
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "structmember.h"
|
#include "structmember.h"
|
||||||
|
|
||||||
#include "pythread.h"
|
|
||||||
|
|
||||||
#include <bzlib.h>
|
#include <bzlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
|
|
||||||
#include <Python.h>
|
#include <Python.h>
|
||||||
#include "longintrepr.h"
|
#include "longintrepr.h"
|
||||||
#include "pythread.h"
|
|
||||||
#include "structmember.h"
|
#include "structmember.h"
|
||||||
#include "complexobject.h"
|
#include "complexobject.h"
|
||||||
#include "mpdecimal.h"
|
#include "mpdecimal.h"
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "pycore_object.h"
|
#include "pycore_object.h"
|
||||||
#include "structmember.h"
|
#include "structmember.h"
|
||||||
#include "pythread.h"
|
|
||||||
#include "_iomodule.h"
|
#include "_iomodule.h"
|
||||||
|
|
||||||
/*[clinic input]
|
/*[clinic input]
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "structmember.h"
|
#include "structmember.h"
|
||||||
#include "pythread.h"
|
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "structmember.h" /* offsetof */
|
#include "structmember.h" /* offsetof */
|
||||||
#include "pythread.h"
|
|
||||||
|
|
||||||
/*[clinic input]
|
/*[clinic input]
|
||||||
module _queue
|
module _queue
|
||||||
|
|
|
@ -30,8 +30,6 @@
|
||||||
#include "prepare_protocol.h"
|
#include "prepare_protocol.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
#include "pythread.h"
|
|
||||||
|
|
||||||
#define ACTION_FINALIZE 1
|
#define ACTION_FINALIZE 1
|
||||||
#define ACTION_RESET 2
|
#define ACTION_RESET 2
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,6 @@
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
|
|
||||||
#include "pythread.h"
|
|
||||||
|
|
||||||
/* Redefined below for Windows debug builds after important #includes */
|
/* Redefined below for Windows debug builds after important #includes */
|
||||||
#define _PySSL_FIX_ERRNO
|
#define _PySSL_FIX_ERRNO
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "datetime.h"
|
#include "datetime.h"
|
||||||
#include "marshal.h"
|
#include "marshal.h"
|
||||||
#include "pythread.h"
|
|
||||||
#include "structmember.h"
|
#include "structmember.h"
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#include "pycore_pylifecycle.h"
|
#include "pycore_pylifecycle.h"
|
||||||
#include "pycore_interp.h" // _PyInterpreterState.num_threads
|
#include "pycore_interp.h" // _PyInterpreterState.num_threads
|
||||||
#include "pycore_pystate.h" // _PyThreadState_Init()
|
#include "pycore_pystate.h" // _PyThreadState_Init()
|
||||||
#include "pythread.h"
|
|
||||||
#include <stddef.h> // offsetof()
|
#include <stddef.h> // offsetof()
|
||||||
|
|
||||||
static PyObject *ThreadError;
|
static PyObject *ThreadError;
|
||||||
|
|
|
@ -26,8 +26,6 @@ Copyright (C) 1994 Steen Lumholt.
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#include "pythread.h"
|
|
||||||
|
|
||||||
#ifdef MS_WINDOWS
|
#ifdef MS_WINDOWS
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
#include "pycore_traceback.h"
|
#include "pycore_traceback.h"
|
||||||
#include "hashtable.h"
|
#include "hashtable.h"
|
||||||
#include "frameobject.h"
|
#include "frameobject.h"
|
||||||
#include "pythread.h"
|
|
||||||
#include "osdefs.h"
|
#include "osdefs.h"
|
||||||
|
|
||||||
#include "clinic/_tracemalloc.c.h"
|
#include "clinic/_tracemalloc.c.h"
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "pycore_initconfig.h"
|
#include "pycore_initconfig.h"
|
||||||
#include "pycore_traceback.h"
|
#include "pycore_traceback.h"
|
||||||
#include "pythread.h"
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <object.h>
|
#include <object.h>
|
||||||
#include <frameobject.h>
|
#include <frameobject.h>
|
||||||
|
|
|
@ -38,7 +38,6 @@
|
||||||
#include "pycore_ceval.h" /* _PyEval_ReInitThreads() */
|
#include "pycore_ceval.h" /* _PyEval_ReInitThreads() */
|
||||||
#include "pycore_import.h" /* _PyImport_ReInitLock() */
|
#include "pycore_import.h" /* _PyImport_ReInitLock() */
|
||||||
#include "pycore_pystate.h" /* _PyInterpreterState_GET() */
|
#include "pycore_pystate.h" /* _PyInterpreterState_GET() */
|
||||||
#include "pythread.h"
|
|
||||||
#include "structmember.h"
|
#include "structmember.h"
|
||||||
#ifndef MS_WINDOWS
|
#ifndef MS_WINDOWS
|
||||||
# include "posixmodule.h"
|
# include "posixmodule.h"
|
||||||
|
|
|
@ -104,8 +104,6 @@ class sigset_t_converter(CConverter):
|
||||||
may not be the thread that received the signal.
|
may not be the thread that received the signal.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pythread.h"
|
|
||||||
|
|
||||||
static volatile struct {
|
static volatile struct {
|
||||||
_Py_atomic_int tripped;
|
_Py_atomic_int tripped;
|
||||||
PyObject *func;
|
PyObject *func;
|
||||||
|
|
|
@ -234,11 +234,6 @@ http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/net/getaddrinfo.c.diff?r1=1.82&
|
||||||
#define RELEASE_GETADDRINFO_LOCK
|
#define RELEASE_GETADDRINFO_LOCK
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(USE_GETHOSTBYNAME_LOCK) || defined(USE_GETADDRINFO_LOCK)
|
|
||||||
# include "pythread.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(__APPLE__) || defined(__CYGWIN__) || defined(__NetBSD__)
|
#if defined(__APPLE__) || defined(__CYGWIN__) || defined(__NetBSD__)
|
||||||
# include <sys/ioctl.h>
|
# include <sys/ioctl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
# ifdef MS_WINDOWS
|
# ifdef MS_WINDOWS
|
||||||
# define WIN32_LEAN_AND_MEAN
|
# define WIN32_LEAN_AND_MEAN
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#include "pythread.h"
|
|
||||||
# endif /* MS_WINDOWS */
|
# endif /* MS_WINDOWS */
|
||||||
#endif /* !__WATCOMC__ || __QNX__ */
|
#endif /* !__WATCOMC__ || __QNX__ */
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
#include "zlib.h"
|
#include "zlib.h"
|
||||||
|
|
||||||
|
|
||||||
#include "pythread.h"
|
|
||||||
#define ENTER_ZLIB(obj) \
|
#define ENTER_ZLIB(obj) \
|
||||||
Py_BEGIN_ALLOW_THREADS; \
|
Py_BEGIN_ALLOW_THREADS; \
|
||||||
PyThread_acquire_lock((obj)->lock, 1); \
|
PyThread_acquire_lock((obj)->lock, 1); \
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
|
|
||||||
PyThreadState* _PyOS_ReadlineTState = NULL;
|
PyThreadState* _PyOS_ReadlineTState = NULL;
|
||||||
|
|
||||||
#include "pythread.h"
|
|
||||||
static PyThread_type_lock _PyOS_ReadlineLock = NULL;
|
static PyThread_type_lock _PyOS_ReadlineLock = NULL;
|
||||||
|
|
||||||
int (*PyOS_InputHook)(void) = NULL;
|
int (*PyOS_InputHook)(void) = NULL;
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
#include "pycore_initconfig.h" // _PyConfig_InitCompatConfig()
|
#include "pycore_initconfig.h" // _PyConfig_InitCompatConfig()
|
||||||
#include "pycore_runtime.h" // _PyRuntime
|
#include "pycore_runtime.h" // _PyRuntime
|
||||||
#include <Python.h>
|
#include <Python.h>
|
||||||
#include "pythread.h"
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
|
|
@ -240,7 +240,6 @@ UNSIGNAL_ASYNC_EXC(PyInterpreterState *interp)
|
||||||
#ifdef HAVE_ERRNO_H
|
#ifdef HAVE_ERRNO_H
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#endif
|
#endif
|
||||||
#include "pythread.h"
|
|
||||||
#include "ceval_gil.h"
|
#include "ceval_gil.h"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -150,8 +150,6 @@ _PyImportZip_Init(PyThreadState *tstate)
|
||||||
in different threads to return with a partially loaded module.
|
in different threads to return with a partially loaded module.
|
||||||
These calls are serialized by the global interpreter lock. */
|
These calls are serialized by the global interpreter lock. */
|
||||||
|
|
||||||
#include "pythread.h"
|
|
||||||
|
|
||||||
static PyThread_type_lock import_lock = 0;
|
static PyThread_type_lock import_lock = 0;
|
||||||
static unsigned long import_lock_thread = PYTHREAD_INVALID_THREAD_ID;
|
static unsigned long import_lock_thread = PYTHREAD_INVALID_THREAD_ID;
|
||||||
static int import_lock_level = 0;
|
static int import_lock_level = 0;
|
||||||
|
|
|
@ -2350,8 +2350,6 @@ Py_ExitStatusException(PyStatus status)
|
||||||
|
|
||||||
/* Clean up and exit */
|
/* Clean up and exit */
|
||||||
|
|
||||||
# include "pythread.h"
|
|
||||||
|
|
||||||
/* For the atexit module. */
|
/* For the atexit module. */
|
||||||
void _Py_PyAtExit(void (*func)(PyObject *), PyObject *module)
|
void _Py_PyAtExit(void (*func)(PyObject *), PyObject *module)
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,7 +26,6 @@ Data members:
|
||||||
#include "pycore_pymem.h"
|
#include "pycore_pymem.h"
|
||||||
#include "pycore_pystate.h" // _PyThreadState_GET()
|
#include "pycore_pystate.h" // _PyThreadState_GET()
|
||||||
#include "pycore_tupleobject.h"
|
#include "pycore_tupleobject.h"
|
||||||
#include "pythread.h"
|
|
||||||
#include "pydtrace.h"
|
#include "pydtrace.h"
|
||||||
|
|
||||||
#include "osdefs.h"
|
#include "osdefs.h"
|
||||||
|
|
|
@ -23,8 +23,6 @@
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "pythread.h"
|
|
||||||
|
|
||||||
#ifndef _POSIX_THREADS
|
#ifndef _POSIX_THREADS
|
||||||
|
|
||||||
/* Check if we're running on HP-UX and _SC_THREADS is defined. If so, then
|
/* Check if we're running on HP-UX and _SC_THREADS is defined. If so, then
|
||||||
|
|
Loading…
Reference in New Issue