[bindings] add a default parameter to is_transfer_full whose default is False
This commit is contained in:
parent
b35fc7fffb
commit
ec23b23455
|
@ -258,14 +258,15 @@ def is_int(arg, binding_data):
|
|||
def is_time_t_pointer(arg):
|
||||
return re.match(r'\btime_t\*', unconstify(arg_type(arg)))
|
||||
|
||||
def is_transfer_full(arg):
|
||||
def is_transfer_full(arg, default=False):
|
||||
if not isinstance(arg, tuple):
|
||||
return False
|
||||
return default
|
||||
transfer = arg[2].get('transfer')
|
||||
if transfer:
|
||||
return transfer == 'full'
|
||||
else:
|
||||
return is_out(arg) or is_object(arg)
|
||||
if is_cstring(arg) and is_const(arg):
|
||||
return False
|
||||
return default or is_out(arg) or is_object(arg)
|
||||
|
||||
_not_objects = ( 'GHashTable', 'GList', 'GType' )
|
||||
|
||||
|
|
Loading…
Reference in New Issue