From ab2f8fcba24bb2a9a1ddd8b08ec9dc8836fcf0b0 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Thu, 3 Dec 2009 08:06:22 -0200 Subject: Check for AsyncReadyCallback / DestroyNotify This should have been included with f74823. Fixes the async/notified scope annotation for glib/gio. --- giscanner/annotationparser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py index f03c6240..67d732eb 100644 --- a/giscanner/annotationparser.py +++ b/giscanner/annotationparser.py @@ -414,7 +414,7 @@ class AnnotationApplier(object): def _parse_callable(self, callable, block): self._parse_node_common(callable, block) for i, param in enumerate(callable.parameters): - if param.type.name != 'GLib.DestroyNotify': + if param.type.name not in ['DestroyNotify', 'GLib.DestroyNotify']: continue if i < 2: break @@ -508,7 +508,8 @@ class AnnotationApplier(object): if scope: param.scope = scope.one() param.transfer = PARAM_TRANSFER_NONE - elif param.type.name == 'Gio.AsyncReadyCallback': + elif param.type.name in ['AsyncReadyCallback', + 'Gio.AsyncReadyCallback']: param.scope = OPT_SCOPE_ASYNC param.transfer = PARAM_TRANSFER_NONE -- cgit v1.2.1