Issue #22615: Argument Clinic now supports the "type" argument for the

int converter.  This permits using the int converter with enums and
typedefs.
This commit is contained in:
Larry Hastings 2014-10-13 10:39:41 +01:00
parent 6f3bdc9484
commit dfbeb160de
5 changed files with 68 additions and 59 deletions

View file

@ -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'