-
- Downloads
gh-92651: Remove the Include/token.h header file (#92652)
Remove the token.h header file. There was never any public tokenizer C API. The token.h header file was only designed to be used by Python internals. Move Include/token.h to Include/internal/pycore_token.h. Including this header file now requires that the Py_BUILD_CORE macro is defined. It no longer checks for the Py_LIMITED_API macro. Rename functions: * PyToken_OneChar() => _PyToken_OneChar() * PyToken_TwoChars() => _PyToken_TwoChars() * PyToken_ThreeChars() => _PyToken_ThreeChars()
Showing
- Doc/whatsnew/3.12.rst 5 additions, 0 deletionsDoc/whatsnew/3.12.rst
- Include/internal/pycore_token.h 11 additions, 8 deletionsInclude/internal/pycore_token.h
- Makefile.pre.in 3 additions, 3 deletionsMakefile.pre.in
- Misc/NEWS.d/next/C API/2022-05-11-02-33-10.gh-issue-92651.FIXLf0.rst 3 additions, 0 deletions.../next/C API/2022-05-11-02-33-10.gh-issue-92651.FIXLf0.rst
- PCbuild/pythoncore.vcxproj 1 addition, 1 deletionPCbuild/pythoncore.vcxproj
- PCbuild/pythoncore.vcxproj.filters 3 additions, 3 deletionsPCbuild/pythoncore.vcxproj.filters
- PCbuild/regen.targets 1 addition, 1 deletionPCbuild/regen.targets
- Parser/pegen.h 1 addition, 1 deletionParser/pegen.h
- Parser/token.c 4 additions, 4 deletionsParser/token.c
- Parser/tokenizer.c 3 additions, 3 deletionsParser/tokenizer.c
- Parser/tokenizer.h 1 addition, 1 deletionParser/tokenizer.h
- Python/pythonrun.c 0 additions, 1 deletionPython/pythonrun.c
- Tools/scripts/generate_token.py 16 additions, 13 deletionsTools/scripts/generate_token.py
Loading
Please register or sign in to comment