summaryrefslogtreecommitdiffstats
path: root/Makefile.pre.in
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-05-11 21:22:50 (GMT)
committerGitHub <noreply@github.com>2022-05-11 21:22:50 (GMT)
commitda5727a120e426ffaf68bf3a8016491205bd2f80 (patch)
treea1d551bbc55b420de3f7c68b69a05fdf080e83f2 /Makefile.pre.in
parentb69297ea23c0ab9866ae8bd26a347a9b5df567a6 (diff)
downloadcpython-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 'Makefile.pre.in')
-rw-r--r--Makefile.pre.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index e45d4fe..869c78e 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1325,11 +1325,11 @@ regen-token:
$(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_token.py rst \
$(srcdir)/Grammar/Tokens \
$(srcdir)/Doc/library/token-list.inc
- # Regenerate Include/token.h from Grammar/Tokens
+ # Regenerate Include/internal/pycore_token.h from Grammar/Tokens
# using Tools/scripts/generate_token.py
$(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_token.py h \
$(srcdir)/Grammar/Tokens \
- $(srcdir)/Include/token.h
+ $(srcdir)/Include/internal/pycore_token.h
# Regenerate Parser/token.c from Grammar/Tokens
# using Tools/scripts/generate_token.py
$(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_token.py c \
@@ -1521,7 +1521,6 @@ PYTHON_HEADERS= \
$(srcdir)/Include/structmember.h \
$(srcdir)/Include/structseq.h \
$(srcdir)/Include/sysmodule.h \
- $(srcdir)/Include/token.h \
$(srcdir)/Include/traceback.h \
$(srcdir)/Include/tracemalloc.h \
$(srcdir)/Include/tupleobject.h \
@@ -1632,6 +1631,7 @@ PYTHON_HEADERS= \
$(srcdir)/Include/internal/pycore_structseq.h \
$(srcdir)/Include/internal/pycore_symtable.h \
$(srcdir)/Include/internal/pycore_sysmodule.h \
+ $(srcdir)/Include/internal/pycore_token.h \
$(srcdir)/Include/internal/pycore_traceback.h \
$(srcdir)/Include/internal/pycore_tuple.h \
$(srcdir)/Include/internal/pycore_typeobject.h \