summaryrefslogtreecommitdiffstats
path: root/Tools/build
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-08-24 15:40:56 (GMT)
committerGitHub <noreply@github.com>2023-08-24 15:40:56 (GMT)
commitf1ae706ca53d43890cf09ccf052d783e97ba4b28 (patch)
treed4f8bdd2462bd3091674c068f53ef456e368d2a2 /Tools/build
parent52c6a6e48a5fa12af401810722cfcad859e9881a (diff)
downloadcpython-f1ae706ca53d43890cf09ccf052d783e97ba4b28.zip
cpython-f1ae706ca53d43890cf09ccf052d783e97ba4b28.tar.gz
cpython-f1ae706ca53d43890cf09ccf052d783e97ba4b28.tar.bz2
gh-107211: No longer export internal functions (7) (#108425)
No longer export _PyUnicode_FromId() internal C API function. Change comment style to "// comment" and add comment explaining why other functions have to be exported. Update Tools/build/generate_token.py to update Include/internal/pycore_token.h comments.
Diffstat (limited to 'Tools/build')
-rwxr-xr-xTools/build/generate_token.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/build/generate_token.py b/Tools/build/generate_token.py
index 3bd307c..16c3884 100755
--- a/Tools/build/generate_token.py
+++ b/Tools/build/generate_token.py
@@ -50,7 +50,7 @@ def update_file(file, content):
token_h_template = f"""\
-/* {AUTO_GENERATED_BY_SCRIPT} */
+// {AUTO_GENERATED_BY_SCRIPT}
"""
token_h_template += """\
@@ -84,7 +84,7 @@ extern "C" {
(x) == FSTRING_MIDDLE)
-// Symbols exported for test_peg_generator
+// Export these 4 symbols for 'test_peg_generator'
PyAPI_DATA(const char * const) _PyParser_TokenNames[]; /* Token names */
PyAPI_FUNC(int) _PyToken_OneChar(int);
PyAPI_FUNC(int) _PyToken_TwoChars(int, int);