diff options
author | Larry Hastings <larry@hastings.org> | 2014-10-13 09:39:41 (GMT) |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2014-10-13 09:39:41 (GMT) |
commit | dfbeb160de829d16d3668dec5bc902a31ad25835 (patch) | |
tree | c5389a8396acbab2ec6ac82350405d786aaa3444 /Tools/clinic | |
parent | 6f3bdc94848d8c99ad2b7eb79e90ddb6e9f602c6 (diff) | |
download | cpython-dfbeb160de829d16d3668dec5bc902a31ad25835.zip cpython-dfbeb160de829d16d3668dec5bc902a31ad25835.tar.gz cpython-dfbeb160de829d16d3668dec5bc902a31ad25835.tar.bz2 |
Issue #22615: Argument Clinic now supports the "type" argument for the
int converter. This permits using the int converter with enums and
typedefs.
Diffstat (limited to 'Tools/clinic')
-rwxr-xr-x | Tools/clinic/clinic.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py index 962abdf..92edf6f 100755 --- a/Tools/clinic/clinic.py +++ b/Tools/clinic/clinic.py @@ -2426,11 +2426,13 @@ class int_converter(CConverter): format_unit = 'i' c_ignored_default = "0" - def converter_init(self, *, types='int'): + def converter_init(self, *, types='int', type=None): if types == 'str': self.format_unit = 'C' elif types != 'int': fail("int_converter: illegal 'types' argument") + if type != None: + self.type = type class unsigned_int_converter(CConverter): type = 'unsigned int' |