giscanner: mark GAsyncReadyCallbacks as allow-none
authorDan Winship <danw@gnome.org>
Wed, 29 Jun 2011 12:41:41 +0000 (08:41 -0400)
committerDan Winship <danw@gnome.org>
Fri, 1 Jul 2011 15:29:01 +0000 (11:29 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=653484

giscanner/maintransformer.py
tests/scanner/Foo-1.0-expected.gir
tests/scanner/Regress-1.0-expected.gir

index 0fa890514963bcb2f0cfe71e298f4421afd29fe4..34d17b440e41e53e5cf6ba6c4a75db06643940b2 100644 (file)
@@ -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
 
index fa5ee930263534f3a7b39632ba33cb5692fb5bf5..8b9dc387074653c091deb4058b24e54b8e444059 100644 (file)
@@ -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"/>
index e2f2f93e808342ecd6fed739d2d891b6f636a520..a85f38b31207efab57b13fe5a4944a64301529c3 100644 (file)
@@ -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>