]> granicus.if.org Git - python/commitdiff
bpo-38353: Fix compiler warning in pycore_initconfig.h (GH-16570)
authorVictor Stinner <vstinner@python.org>
Thu, 3 Oct 2019 22:43:10 +0000 (00:43 +0200)
committerGitHub <noreply@github.com>
Thu, 3 Oct 2019 22:43:10 +0000 (00:43 +0200)
Replace "_PyRuntimeState" with "struct pyruntimestate" to avoid
a warning on typedef re-definition.

Include/internal/pycore_initconfig.h

index 4a1a111af68347aa76eeda51a84cebdb5a143019..8c6706c95cbd1e8566be9d8b45fd51674ad70126 100644 (file)
@@ -9,7 +9,7 @@ extern "C" {
 #endif
 
 /* Forward declaration */
-typedef struct pyruntimestate _PyRuntimeState;
+struct pyruntimestate;
 
 /* --- PyStatus ----------------------------------------------- */
 
@@ -151,7 +151,7 @@ extern PyStatus _PyConfig_Copy(
     const PyConfig *config2);
 extern PyStatus _PyConfig_InitPathConfig(PyConfig *config);
 extern void _PyConfig_Write(const PyConfig *config,
-    _PyRuntimeState *runtime);
+    struct pyruntimestate *runtime);
 extern PyStatus _PyConfig_SetPyArgv(
     PyConfig *config,
     const _PyArgv *args);