Bindings: add time_t to integer types, add unpointerize method
This commit is contained in:
parent
80e61cf635
commit
4912a56b6a
|
@ -200,11 +200,14 @@ def is_boolean(arg):
|
|||
def is_pointer(arg):
|
||||
return arg_type(arg).endswith('*')
|
||||
|
||||
def unpointerize(arg):
|
||||
return arg_type(arg).replace('*','')
|
||||
|
||||
def is_list(arg):
|
||||
return unconstify(arg_type(arg)).startswith('GList')
|
||||
|
||||
def is_int(arg, binding_data):
|
||||
return arg_type(arg) in [ 'int', 'gint', 'long', 'glong'] + binding_data.enums
|
||||
return arg_type(arg) in [ 'time_t', 'int', 'gint', 'long', 'glong'] + binding_data.enums
|
||||
|
||||
def is_time_t_pointer(arg):
|
||||
return re.match(r'\btime_t\*', unconstify(arg_type(arg)))
|
||||
|
|
Loading…
Reference in New Issue