mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
gh-108765: Python.h no longer includes <ctype.h> (#108831)
Remove <ctype.h> 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 commitb5047fd019in 2004 for MacOSX and FreeBSD. * Test removed by commit52ddaefb6bin 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 <stdio.h>. * getargs.c: remove <float.h>. * dynload_win.c: remove <direct.h>, it no longer calls _getcwd() since commitfb1f68ed7c(in 2001).
This commit is contained in:
parent
1796c191b4
commit
03c4080c71
22 changed files with 86 additions and 114 deletions
|
|
@ -26,15 +26,14 @@ Copyright (C) 1994 Steen Lumholt.
|
|||
#endif
|
||||
|
||||
#include "Python.h"
|
||||
#include <ctype.h>
|
||||
#ifdef MS_WINDOWS
|
||||
# include "pycore_fileutils.h" // _Py_stat()
|
||||
#endif
|
||||
|
||||
#include "pycore_long.h"
|
||||
#include "pycore_long.h" // _PyLong_IsNegative()
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
#include <windows.h>
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#define CHECK_SIZE(size, elemsize) \
|
||||
|
|
@ -46,11 +45,11 @@ Copyright (C) 1994 Steen Lumholt.
|
|||
#define TCL_THREADS
|
||||
|
||||
#ifdef TK_FRAMEWORK
|
||||
#include <Tcl/tcl.h>
|
||||
#include <Tk/tk.h>
|
||||
# include <Tcl/tcl.h>
|
||||
# include <Tk/tk.h>
|
||||
#else
|
||||
#include <tcl.h>
|
||||
#include <tk.h>
|
||||
# include <tcl.h>
|
||||
# include <tk.h>
|
||||
#endif
|
||||
|
||||
#include "tkinter.h"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue