diff options
author | Andreas Rottmann <a.rottmann@gmx.at> | 2009-02-26 21:17:39 +0100 |
---|---|---|
committer | Andreas Rottmann <a.rottmann@gmx.at> | 2009-02-26 21:17:39 +0100 |
commit | e49a883d0997127cd3a0ad7e522666f30190e792 (patch) | |
tree | 187690408c8de64775419214762c7e57244302dd /giscanner/transformer.py | |
parent | 1b3ce6945e359e6cfbf1805be19db9599f134e09 (diff) | |
download | gobject-introspection-e49a883d0997127cd3a0ad7e522666f30190e792.tar.gz |
Bug 573306 – Relax callback grouping detection rules
Make the callback grouping heuristic more lax: consider all pointer
parameters ending in 'data' to be the user_data parameter (instead of
requiring an exact 'user_data' name).
Signed-off-by: Andreas Rottmann <a.rottmann@gmx.at>
Diffstat (limited to 'giscanner/transformer.py')
-rw-r--r-- | giscanner/transformer.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/giscanner/transformer.py b/giscanner/transformer.py index eb76f830..8e3219ae 100644 --- a/giscanner/transformer.py +++ b/giscanner/transformer.py @@ -237,7 +237,7 @@ class Transformer(object): def _handle_closure(self, param, closure_idx, closure_param): if (closure_param.type.name == 'any' and - closure_param.name == 'user_data'): + closure_param.name.endswith('data')): param.closure_name = closure_param.name param.closure_index = closure_idx return True @@ -261,9 +261,9 @@ class Transformer(object): # group with the callback param j = i + 1 if j == len(params): - continue # no more args -> nothing to group look - # at the param directly following for either a closure - # or a destroy; only one of these will fire + continue # no more args -> nothing to group + # look at the param directly following for either a + # closure or a destroy; only one of these will fire had_closure = self._handle_closure(param, j, params[j]) had_destroy = self._handle_destroy(param, j, params[j]) j += 1 |