Skip to content

Commit 08bc1ba

Browse files
authored
bpo-46303: Fix fileutils.h compiler warnings (GH-30550)
Add missing pycore_fileutils.h include in _tkinter.c and _testconsole.c.
1 parent 607d8a8 commit 08bc1ba

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Modules/_tkinter.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,15 @@ Copyright (C) 1994 Steen Lumholt.
2222
*/
2323

2424
#define PY_SSIZE_T_CLEAN
25+
#ifndef Py_BUILD_CORE_BUILTIN
26+
# define Py_BUILD_CORE_MODULE 1
27+
#endif
2528

2629
#include "Python.h"
2730
#include <ctype.h>
31+
#ifdef MS_WINDOWS
32+
# include "pycore_fileutils.h" // _Py_stat()
33+
#endif
2834

2935
#ifdef MS_WINDOWS
3036
#include <windows.h>

PC/_testconsole.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
21
/* Testing module for multi-phase initialization of extension modules (PEP 489)
32
*/
43

4+
#ifndef Py_BUILD_CORE_BUILTIN
5+
# define Py_BUILD_CORE_MODULE 1
6+
#endif
7+
58
#include "Python.h"
69

710
#ifdef MS_WINDOWS
811

12+
#include "pycore_fileutils.h" // _Py_get_osfhandle()
913
#include "..\modules\_io\_iomodule.h"
1014

1115
#define WIN32_LEAN_AND_MEAN

0 commit comments

Comments
 (0)