gh-108444: Argument Clinic uses PyLong_AsInt() (#108458)

Argument Clinic now uses the new public PyLong_AsInt(), rather than
the old name _PyLong_AsInt().
This commit is contained in:
Victor Stinner 2023-08-25 00:51:22 +02:00 • committed by GitHub
parent be800f4be7
commit 4e5a7284ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
73 changed files with 467 additions and 466 deletions

View file

@ -3398,7 +3398,7 @@ class bool_converter(CConverter):
def parse_arg(self, argname: str, displayname: str) -> str | None:
if self.format_unit == 'i':
return """
{paramname} = _PyLong_AsInt({argname});
{paramname} = PyLong_AsInt({argname});
if ({paramname} == -1 && PyErr_Occurred()) {{{{
goto exit;
}}}}
@ -3586,7 +3586,7 @@ class int_converter(CConverter):
def parse_arg(self, argname: str, displayname: str) -> str | None:
if self.format_unit == 'i':
return """
{paramname} = _PyLong_AsInt({argname});
{paramname} = PyLong_AsInt({argname});
if ({paramname} == -1 && PyErr_Occurred()) {{{{
goto exit;
}}}}