Issue #22615: Argument Clinic now supports the "type" argument for the
int converter. This permits using the int converter with enums and
typedefs.
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 @@
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'