summaryrefslogtreecommitdiffstats
path: root/Tools/build
diff options
context:
space:
mode:
authorJelle Zijlstra <jelle.zijlstra@gmail.com>2024-09-27 04:37:21 (GMT)
committerGitHub <noreply@github.com>2024-09-27 04:37:21 (GMT)
commit25189188bfcb48be653eb9fb3aee892f2b9539b9 (patch)
tree10225719925d89ef5905f9978ce28d96e969ca50 /Tools/build
parent6f9525dd3f0ef5809106ca0923a7512d666a04bb (diff)
downloadcpython-25189188bfcb48be653eb9fb3aee892f2b9539b9.zip
cpython-25189188bfcb48be653eb9fb3aee892f2b9539b9.tar.gz
cpython-25189188bfcb48be653eb9fb3aee892f2b9539b9.tar.bz2
generate_global_objects.py: Fix name of macro in error message (#124464)
_PyID does not exist but _Py_ID does.
Diffstat (limited to 'Tools/build')
-rw-r--r--Tools/build/generate_global_objects.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/build/generate_global_objects.py b/Tools/build/generate_global_objects.py
index 882918f..b5b6de0 100644
--- a/Tools/build/generate_global_objects.py
+++ b/Tools/build/generate_global_objects.py
@@ -433,7 +433,7 @@ def get_identifiers_and_strings() -> 'tuple[set[str], dict[str, str]]':
# Give a nice message for common mistakes.
# To cover tricky cases (like "\n") we also generate C asserts.
raise ValueError(
- 'do not use &_PyID or &_Py_STR for one-character latin-1 '
+ 'do not use &_Py_ID or &_Py_STR for one-character latin-1 '
+ f'strings, use _Py_LATIN1_CHR instead: {string!r}')
if string not in strings:
strings[string] = name
@@ -442,7 +442,7 @@ def get_identifiers_and_strings() -> 'tuple[set[str], dict[str, str]]':
overlap = identifiers & set(strings.keys())
if overlap:
raise ValueError(
- 'do not use both _PyID and _Py_DECLARE_STR for the same string: '
+ 'do not use both _Py_ID and _Py_DECLARE_STR for the same string: '
+ repr(overlap))
return identifiers, strings