]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-46303: Fix fileutils.h compiler warnings (GH-30550)
authorVictor Stinner <vstinner@python.org>
Tue, 11 Jan 2022 23:35:26 +0000 (00:35 +0100)
committerGitHub <noreply@github.com>
Tue, 11 Jan 2022 23:35:26 +0000 (00:35 +0100)
Add missing pycore_fileutils.h include in _tkinter.c and
_testconsole.c.

Modules/_tkinter.c
PC/_testconsole.c

index aabf20b8d963c7189f06e9e23b2797496255793e..f4d2716fe302d2a2faa43fe31bb93e00295a065a 100644 (file)
@@ -22,9 +22,15 @@ Copyright (C) 1994 Steen Lumholt.
 */
 
 #define PY_SSIZE_T_CLEAN
+#ifndef Py_BUILD_CORE_BUILTIN
+#  define Py_BUILD_CORE_MODULE 1
+#endif
 
 #include "Python.h"
 #include <ctype.h>
+#ifdef MS_WINDOWS
+#  include "pycore_fileutils.h"   // _Py_stat()
+#endif
 
 #ifdef MS_WINDOWS
 #include <windows.h>
index db84f73c7744f39fcd5cdc19172d6f1234d5ca1c..a8308835d8f85dc061c5d4c89b23f5f4ac745fe1 100644 (file)
@@ -1,11 +1,15 @@
-
 /* Testing module for multi-phase initialization of extension modules (PEP 489)
  */
 
+#ifndef Py_BUILD_CORE_BUILTIN
+#  define Py_BUILD_CORE_MODULE 1
+#endif
+
 #include "Python.h"
 
 #ifdef MS_WINDOWS
 
+#include "pycore_fileutils.h"     // _Py_get_osfhandle()
 #include "..\modules\_io\_iomodule.h"
 
 #define WIN32_LEAN_AND_MEAN