diff options
author | Victor Stinner <vstinner@python.org> | 2019-10-04 00:21:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-04 00:21:05 (GMT) |
commit | e982d8b64f5d358c578bfca5cdfe4524dbc74000 (patch) | |
tree | da1c2c20db424c1b89595655b396a0bd000090bd /Include/internal | |
parent | c515b573af1189fc46ddcd3323c53ed073b84848 (diff) | |
download | cpython-e982d8b64f5d358c578bfca5cdfe4524dbc74000.zip cpython-e982d8b64f5d358c578bfca5cdfe4524dbc74000.tar.gz cpython-e982d8b64f5d358c578bfca5cdfe4524dbc74000.tar.bz2 |
bpo-38353: Fix compiler warning in internal headers (GH-16573)
Replace "_PyRuntimeState" with "struct pyruntimestate" to avoid
a warning on typedef re-definition.
Diffstat (limited to 'Include/internal')
-rw-r--r-- | Include/internal/pycore_ceval.h | 6 | ||||
-rw-r--r-- | Include/internal/pycore_pylifecycle.h | 22 | ||||
-rw-r--r-- | Include/internal/pycore_traceback.h | 4 |
3 files changed, 16 insertions, 16 deletions
diff --git a/Include/internal/pycore_ceval.h b/Include/internal/pycore_ceval.h index 65537b1..f20e4eb 100644 --- a/Include/internal/pycore_ceval.h +++ b/Include/internal/pycore_ceval.h @@ -9,10 +9,10 @@ extern "C" { #endif /* Forward declarations */ -typedef struct pyruntimestate _PyRuntimeState; +struct pyruntimestate; struct _ceval_runtime_state; -PyAPI_FUNC(void) _Py_FinishPendingCalls(_PyRuntimeState *runtime); +PyAPI_FUNC(void) _Py_FinishPendingCalls(struct pyruntimestate *runtime); PyAPI_FUNC(void) _PyEval_Initialize(struct _ceval_runtime_state *); PyAPI_FUNC(void) _PyEval_FiniThreads( struct _ceval_runtime_state *ceval); @@ -26,7 +26,7 @@ PyAPI_FUNC(int) _PyEval_AddPendingCall( PyAPI_FUNC(void) _PyEval_SignalAsyncExc( struct _ceval_runtime_state *ceval); PyAPI_FUNC(void) _PyEval_ReInitThreads( - _PyRuntimeState *runtime); + struct pyruntimestate *runtime); PyAPI_FUNC(void) _PyEval_SetCoroutineOriginTrackingDepth( PyThreadState *tstate, int new_depth); diff --git a/Include/internal/pycore_pylifecycle.h b/Include/internal/pycore_pylifecycle.h index d6f9ecc..d89dbea 100644 --- a/Include/internal/pycore_pylifecycle.h +++ b/Include/internal/pycore_pylifecycle.h @@ -9,8 +9,8 @@ extern "C" { #endif /* Forward declarations */ -typedef struct _PyArgv _PyArgv; -typedef struct pyruntimestate _PyRuntimeState; +struct _PyArgv; +struct pyruntimestate; /* True if the main interpreter thread exited due to an unhandled * KeyboardInterrupt exception, suggesting the user pressed ^C. */ @@ -38,14 +38,14 @@ extern PyStatus _PyFaulthandler_Init(int enable); extern int _PyTraceMalloc_Init(int enable); extern PyObject * _PyBuiltin_Init(PyThreadState *tstate); extern PyStatus _PySys_Create( - _PyRuntimeState *runtime, + struct pyruntimestate *runtime, PyThreadState *tstate, PyObject **sysmod_p); extern PyStatus _PySys_SetPreliminaryStderr(PyObject *sysdict); extern PyStatus _PySys_ReadPreinitWarnOptions(PyWideStringList *options); extern PyStatus _PySys_ReadPreinitXOptions(PyConfig *config); extern int _PySys_InitMain( - _PyRuntimeState *runtime, + struct pyruntimestate *runtime, PyThreadState *tstate); extern PyStatus _PyImport_Init(PyThreadState *tstate); extern PyStatus _PyExc_Init(void); @@ -78,7 +78,7 @@ extern void PyOS_FiniInterrupts(void); extern void _PyExc_Fini(void); extern void _PyImport_Fini(void); extern void _PyImport_Fini2(void); -extern void _PyGC_Fini(_PyRuntimeState *runtime); +extern void _PyGC_Fini(struct pyruntimestate *runtime); extern void _PyType_Fini(void); extern void _Py_HashRandomization_Fini(void); extern void _PyUnicode_Fini(void); @@ -89,18 +89,18 @@ extern void _PyTraceMalloc_Fini(void); extern void _PyWarnings_Fini(PyInterpreterState *interp); extern void _PyGILState_Init( - _PyRuntimeState *runtime, + struct pyruntimestate *runtime, PyThreadState *tstate); -extern void _PyGILState_Fini(_PyRuntimeState *runtime); +extern void _PyGILState_Fini(struct pyruntimestate *runtime); -PyAPI_FUNC(void) _PyGC_DumpShutdownStats(_PyRuntimeState *runtime); +PyAPI_FUNC(void) _PyGC_DumpShutdownStats(struct pyruntimestate *runtime); PyAPI_FUNC(PyStatus) _Py_PreInitializeFromPyArgv( const PyPreConfig *src_config, - const _PyArgv *args); + const struct _PyArgv *args); PyAPI_FUNC(PyStatus) _Py_PreInitializeFromConfig( const PyConfig *config, - const _PyArgv *args); + const struct _PyArgv *args); PyAPI_FUNC(int) _Py_HandleSystemExit(int *exitcode_p); @@ -111,7 +111,7 @@ PyAPI_FUNC(void) _PyErr_Print(PyThreadState *tstate); PyAPI_FUNC(void) _PyErr_Display(PyObject *file, PyObject *exception, PyObject *value, PyObject *tb); -PyAPI_FUNC(void) _PyThreadState_DeleteCurrent(_PyRuntimeState *runtime); +PyAPI_FUNC(void) _PyThreadState_DeleteCurrent(struct pyruntimestate *runtime); #ifdef __cplusplus } diff --git a/Include/internal/pycore_traceback.h b/Include/internal/pycore_traceback.h index 8e58184..99443d7 100644 --- a/Include/internal/pycore_traceback.h +++ b/Include/internal/pycore_traceback.h @@ -9,7 +9,7 @@ extern "C" { #endif /* Forward declaration */ -typedef struct _is PyInterpreterState; +struct _is; /* Write the Python traceback into the file 'fd'. For example: @@ -57,7 +57,7 @@ PyAPI_FUNC(void) _Py_DumpTraceback( PyAPI_FUNC(const char*) _Py_DumpTracebackThreads( int fd, - PyInterpreterState *interp, + struct _is *interp, PyThreadState *current_tstate); /* Write a Unicode object into the file descriptor fd. Encode the string to |