Skip to content

Commit 50e1492

Browse files
JelleZijlstraencukou
authored andcommitted
generate_global_objects.py: Fix name of macro in error message (python#124464)
_PyID does not exist but _Py_ID does.
1 parent 2640dc8 commit 50e1492

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tools/build/generate_global_objects.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ def get_identifiers_and_strings() -> 'tuple[set[str], dict[str, str]]':
425425
# Give a nice message for common mistakes.
426426
# To cover tricky cases (like "\n") we also generate C asserts.
427427
raise ValueError(
428-
'do not use &_PyID or &_Py_STR for one-character latin-1 '
428+
'do not use &_Py_ID or &_Py_STR for one-character latin-1 '
429429
+ f'strings, use _Py_LATIN1_CHR instead: {string!r}')
430430
if string not in strings:
431431
strings[string] = name
@@ -434,7 +434,7 @@ def get_identifiers_and_strings() -> 'tuple[set[str], dict[str, str]]':
434434
overlap = identifiers & set(strings.keys())
435435
if overlap:
436436
raise ValueError(
437-
'do not use both _PyID and _Py_DECLARE_STR for the same string: '
437+
'do not use both _Py_ID and _Py_DECLARE_STR for the same string: '
438438
+ repr(overlap))
439439
return identifiers, strings
440440

0 commit comments

Comments
 (0)