Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rottmann <a.rottmann@gmx.at>2009-02-26 20:17:39 (GMT)
committer Andreas Rottmann <a.rottmann@gmx.at>2009-02-26 20:17:39 (GMT)
commite49a883d0997127cd3a0ad7e522666f30190e792 (patch)
tree187690408c8de64775419214762c7e57244302dd
parent1b3ce6945e359e6cfbf1805be19db9599f134e09 (diff)
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>
-rw-r--r--giscanner/transformer.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/giscanner/transformer.py b/giscanner/transformer.py
index eb76f83..8e3219a 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