From 03c4080c71f49df9c219354b7b38b738917fd2ed Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sun, 3 Sep 2023 18:54:27 +0200 Subject: gh-108765: Python.h no longer includes (#108831) Remove in C files which don't use it; only sre.c and _decimal.c still use it. Remove _PY_PORT_CTYPE_UTF8_ISSUE code from pyport.h: * Code added by commit b5047fd01948ab108edcc1b3c2c901d915814cfd in 2004 for MacOSX and FreeBSD. * Test removed by commit 52ddaefb6bab1a74ecffe8519c02735794ebfbe1 in 2007, since Python str type now uses locale independent functions like Py_ISALPHA() and Py_TOLOWER() and the Unicode database. Modules/_sre/sre.c replaces _PY_PORT_CTYPE_UTF8_ISSUE with new functions: sre_isalnum(), sre_tolower(), sre_toupper(). Remove unused includes: * _localemodule.c: remove . * getargs.c: remove . * dynload_win.c: remove , it no longer calls _getcwd() since commit fb1f68ed7cc1536482d1debd70a53c5442135fe2 (in 2001). --- Python/dynload_win.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'Python/dynload_win.c') diff --git a/Python/dynload_win.c b/Python/dynload_win.c index acab05e2c6d..f69995b8f9e 100644 --- a/Python/dynload_win.c +++ b/Python/dynload_win.c @@ -5,13 +5,8 @@ #include "pycore_fileutils.h" // _Py_add_relfile() #include "pycore_pystate.h" // _PyInterpreterState_GET() -#ifdef HAVE_DIRECT_H -#include -#endif -#include - -#include "importdl.h" -#include "patchlevel.h" +#include "importdl.h" // dl_funcptr +#include "patchlevel.h" // PY_MAJOR_VERSION #include #ifdef _DEBUG -- cgit v1.2.3