]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
generate_global_objects.py: Fix name of macro in error message (#124464)
authorJelle Zijlstra <jelle.zijlstra@gmail.com>
Fri, 27 Sep 2024 04:37:21 +0000 (21:37 -0700)
committerGitHub <noreply@github.com>
Fri, 27 Sep 2024 04:37:21 +0000 (21:37 -0700)
_PyID does not exist but _Py_ID does.

Tools/build/generate_global_objects.py

index 882918fafb1eddc603b03dbf98976b03dd4be644..b5b6de0e7dc2dcdc6ceebccd4096bbf347cac10d 100644 (file)
@@ -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