Skip to content

Commit 2518918

Browse files
generate_global_objects.py: Fix name of macro in error message (#124464)
_PyID does not exist but _Py_ID does.
1 parent 6f9525d commit 2518918

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tools/build/generate_global_objects.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ def get_identifiers_and_strings() -> 'tuple[set[str], dict[str, str]]':
433433
# Give a nice message for common mistakes.
434434
# To cover tricky cases (like "\n") we also generate C asserts.
435435
raise ValueError(
436-
'do not use &_PyID or &_Py_STR for one-character latin-1 '
436+
'do not use &_Py_ID or &_Py_STR for one-character latin-1 '
437437
+ f'strings, use _Py_LATIN1_CHR instead: {string!r}')
438438
if string not in strings:
439439
strings[string] = name
@@ -442,7 +442,7 @@ def get_identifiers_and_strings() -> 'tuple[set[str], dict[str, str]]':
442442
overlap = identifiers & set(strings.keys())
443443
if overlap:
444444
raise ValueError(
445-
'do not use both _PyID and _Py_DECLARE_STR for the same string: '
445+
'do not use both _Py_ID and _Py_DECLARE_STR for the same string: '
446446
+ repr(overlap))
447447
return identifiers, strings
448448

0 commit comments

Comments
 (0)