Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
gh-108765: Python.h no longer includes <ctype.h>#108831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
c8078fa
to3664daf
CompareRemove <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 commitb5047fd in 2004 for MacOSX and FreeBSD.* Test removed by commit52ddaef 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 newfunctions:* 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 commitfb1f68e (in 2001).
I merged my PR. If it causes too many trouble in 3rd party C extensions (require to update too many C extensions before Python 3.13 beta1), I can make this change conditional only in the limited C API version 3.13. See also my PR removing |
bedevere-bot commentedSep 3, 2023
|
Uh oh!
There was an error while loading.Please reload this page.
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:
Modules/_sre/sre.c replaces _PY_PORT_CTYPE_UTF8_ISSUE with new functions:
Remove unused includes:
📚 Documentation preview 📚:https://cpython-previews--108831.org.readthedocs.build/