diff options
author | Victor Stinner <vstinner@python.org> | 2023-08-26 00:24:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-26 00:24:27 (GMT) |
commit | 713afb8804666405f29115cf459b591308e3ab54 (patch) | |
tree | db6bdfbbf19f1b222c4d6a6e027efd6a4202e96c /Tools/clinic | |
parent | 86bc9e35c4aaf3bcc045ddd998844ffb64fec3a2 (diff) | |
download | cpython-713afb8804666405f29115cf459b591308e3ab54.zip cpython-713afb8804666405f29115cf459b591308e3ab54.tar.gz cpython-713afb8804666405f29115cf459b591308e3ab54.tar.bz2 |
gh-106320: Remove private _PyLong converter functions (#108499)
Move these private functions to the internal C API (pycore_long.h):
* _PyLong_UnsignedInt_Converter()
* _PyLong_UnsignedLongLong_Converter()
* _PyLong_UnsignedLong_Converter()
* _PyLong_UnsignedShort_Converter()
Argument Clinic now emits #include "pycore_long.h" when these
functions are used.
Diffstat (limited to 'Tools/clinic')
-rwxr-xr-x | Tools/clinic/clinic.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index a6974bd..c4304bb 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -3629,6 +3629,8 @@ class unsigned_short_converter(CConverter): self.format_unit = 'H' else: self.converter = '_PyLong_UnsignedShort_Converter' + self.add_include('pycore_long.h', + '_PyLong_UnsignedShort_Converter()') def parse_arg(self, argname: str, displayname: str) -> str | None: if self.format_unit == 'H': @@ -3690,6 +3692,8 @@ class unsigned_int_converter(CConverter): self.format_unit = 'I' else: self.converter = '_PyLong_UnsignedInt_Converter' + self.add_include('pycore_long.h', + '_PyLong_UnsignedInt_Converter()') def parse_arg(self, argname: str, displayname: str) -> str | None: if self.format_unit == 'I': @@ -3727,6 +3731,8 @@ class unsigned_long_converter(CConverter): self.format_unit = 'k' else: self.converter = '_PyLong_UnsignedLong_Converter' + self.add_include('pycore_long.h', + '_PyLong_UnsignedLong_Converter()') def parse_arg(self, argname: str, displayname: str) -> str | None: if self.format_unit == 'k': @@ -3766,6 +3772,8 @@ class unsigned_long_long_converter(CConverter): self.format_unit = 'K' else: self.converter = '_PyLong_UnsignedLongLong_Converter' + self.add_include('pycore_long.h', + '_PyLong_UnsignedLongLong_Converter()') def parse_arg(self, argname: str, displayname: str) -> str | None: if self.format_unit == 'K': |