diff options
author | Dan Winship <danw@gnome.org> | 2011-06-29 08:41:41 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2011-07-01 11:29:01 -0400 |
commit | 834f928f2032434fa8f54f68c51cc40fa8271733 (patch) | |
tree | c770c3502c278958e72428803e9422d30ef7af22 | |
parent | a47c78b1c5a577317352411236fbbb7444e97b64 (diff) | |
download | gobject-introspection-834f928f2032434fa8f54f68c51cc40fa8271733.tar.gz |
giscanner: mark GAsyncReadyCallbacks as allow-none
https://bugzilla.gnome.org/show_bug.cgi?id=653484
-rw-r--r-- | giscanner/maintransformer.py | 1 | ||||
-rw-r--r-- | tests/scanner/Foo-1.0-expected.gir | 1 | ||||
-rw-r--r-- | tests/scanner/Regress-1.0-expected.gir | 5 |
3 files changed, 6 insertions, 1 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py index 0fa89051..34d17b44 100644 --- a/giscanner/maintransformer.py +++ b/giscanner/maintransformer.py @@ -537,6 +537,7 @@ usage is void (*_gtk_reserved1)(void);""" self._adjust_container_type(parent, node, options) if (OPT_ALLOW_NONE in options or + node.type.target_giname == 'Gio.AsyncReadyCallback' or node.type.target_giname == 'Gio.Cancellable'): node.allow_none = True diff --git a/tests/scanner/Foo-1.0-expected.gir b/tests/scanner/Foo-1.0-expected.gir index fa5ee930..8b9dc387 100644 --- a/tests/scanner/Foo-1.0-expected.gir +++ b/tests/scanner/Foo-1.0-expected.gir @@ -891,6 +891,7 @@ exposed to language bindings.</doc> </parameter> <parameter name="callback" transfer-ownership="none" + allow-none="1" scope="async" closure="2"> <type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/> diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir index e2f2f93e..a85f38b3 100644 --- a/tests/scanner/Regress-1.0-expected.gir +++ b/tests/scanner/Regress-1.0-expected.gir @@ -1598,7 +1598,10 @@ TpAccount::status-changed</doc> <type name="none" c:type="void"/> </return-value> <parameters> - <parameter name="callback" transfer-ownership="none" scope="async"> + <parameter name="callback" + transfer-ownership="none" + allow-none="1" + scope="async"> <type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/> </parameter> </parameters> |