diff options
author | Victor Stinner <vstinner@python.org> | 2022-05-11 21:22:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-11 21:22:50 (GMT) |
commit | da5727a120e426ffaf68bf3a8016491205bd2f80 (patch) | |
tree | a1d551bbc55b420de3f7c68b69a05fdf080e83f2 /PCbuild | |
parent | b69297ea23c0ab9866ae8bd26a347a9b5df567a6 (diff) | |
download | cpython-da5727a120e426ffaf68bf3a8016491205bd2f80.zip cpython-da5727a120e426ffaf68bf3a8016491205bd2f80.tar.gz cpython-da5727a120e426ffaf68bf3a8016491205bd2f80.tar.bz2 |
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()
Diffstat (limited to 'PCbuild')
-rw-r--r-- | PCbuild/pythoncore.vcxproj | 2 | ||||
-rw-r--r-- | PCbuild/pythoncore.vcxproj.filters | 6 | ||||
-rw-r--r-- | PCbuild/regen.targets | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj index 3ce116d..a35884b 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -244,6 +244,7 @@ <ClInclude Include="..\Include\internal\pycore_structseq.h" /> <ClInclude Include="..\Include\internal\pycore_sysmodule.h" /> <ClInclude Include="..\Include\internal\pycore_symtable.h" /> + <ClInclude Include="..\Include\internal\pycore_token.h" /> <ClInclude Include="..\Include\internal\pycore_traceback.h" /> <ClInclude Include="..\Include\internal\pycore_tuple.h" /> <ClInclude Include="..\Include\internal\pycore_typeobject.h" /> @@ -291,7 +292,6 @@ <ClInclude Include="..\Include\structseq.h" /> <ClInclude Include="..\Include\symtable.h" /> <ClInclude Include="..\Include\sysmodule.h" /> - <ClInclude Include="..\Include\token.h" /> <ClInclude Include="..\Include\traceback.h" /> <ClInclude Include="..\Include\tracemalloc.h" /> <ClInclude Include="..\Include\tupleobject.h" /> diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters index 542d551..ff42cc9 100644 --- a/PCbuild/pythoncore.vcxproj.filters +++ b/PCbuild/pythoncore.vcxproj.filters @@ -213,9 +213,6 @@ <ClInclude Include="..\Include\sysmodule.h"> <Filter>Include</Filter> </ClInclude> - <ClInclude Include="..\Include\token.h"> - <Filter>Include</Filter> - </ClInclude> <ClInclude Include="..\Include\traceback.h"> <Filter>Include</Filter> </ClInclude> @@ -633,6 +630,9 @@ <ClInclude Include="..\Include\internal\pycore_symtable.h"> <Filter>Include\internal</Filter> </ClInclude> + <ClInclude Include="..\Include\internal\pycore_token.h"> + <Filter>Include\internal</Filter> + </ClInclude> <ClInclude Include="..\Include\internal\pycore_traceback.h"> <Filter>Include\internal</Filter> </ClInclude> diff --git a/PCbuild/regen.targets b/PCbuild/regen.targets index 24b5ced..9073bb6 100644 --- a/PCbuild/regen.targets +++ b/PCbuild/regen.targets @@ -19,7 +19,7 @@ <_TokenOutputs Include="$(PySourcePath)Doc\library\token-list.inc"> <Format>rst</Format> </_TokenOutputs> - <_TokenOutputs Include="$(PySourcePath)Include\token.h"> + <_TokenOutputs Include="$(PySourcePath)Include\internal\pycore_token.h"> <Format>h</Format> </_TokenOutputs> <_TokenOutputs Include="$(PySourcePath)Parser\token.c"> |