[gobject-introspection] girparser: Serialize and read back the instance_parameter



commit 9c0bd59b021e163eae191db95ce6beeb389cbd6f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Jan 31 09:36:07 2013 -0500

    girparser: Serialize and read back the instance_parameter
    
    g-ir-doc-tool wants to use the instance parameter to read docs
    and the parameter name, so it needs to be shuttled through the
    GIR.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=693040

 girepository/girparser.c                   |    5 +
 giscanner/girparser.py                     |   26 +++--
 giscanner/girwriter.py                     |   18 ++--
 tests/scanner/Annotation-1.0-expected.gir  |  136 +++++++++++++++++++++++
 tests/scanner/Bar-1.0-expected.gir         |    3 +
 tests/scanner/Foo-1.0-expected.gir         |  121 +++++++++++++++++++++
 tests/scanner/GetType-1.0-expected.gir     |    6 +
 tests/scanner/Regress-1.0-expected.gir     |  162 ++++++++++++++++++++++++++++
 tests/scanner/TestInherit-1.0-expected.gir |   12 ++
 tests/scanner/Utility-1.0-expected.gir     |    3 +
 10 files changed, 474 insertions(+), 18 deletions(-)
---
diff --git a/girepository/girparser.c b/girepository/girparser.c
index d1bc81f..5aaa6dd 100644
--- a/girepository/girparser.c
+++ b/girepository/girparser.c
@@ -2831,6 +2831,11 @@ start_element_handler (GMarkupParseContext *context,
 				 attribute_names, attribute_values,
 				 ctx, error))
 	goto out;
+      else if (strcmp (element_name, "instance-parameter") == 0)
+        {
+          state_switch (ctx, STATE_PASSTHROUGH);
+          goto out;
+        }
       else if (strcmp (element_name, "c:include") == 0)
 	{
 	  state_switch (ctx, STATE_C_INCLUDE);
diff --git a/giscanner/girparser.py b/giscanner/girparser.py
index ea8b0d6..bd259b8 100644
--- a/giscanner/girparser.py
+++ b/giscanner/girparser.py
@@ -286,6 +286,18 @@ class GIRParser(object):
         function = self._parse_function_common(node, ast.Function)
         self._namespace.append(function)
 
+    def _parse_parameter(self, node):
+        typeval = self._parse_type(node)
+        param = ast.Parameter(node.attrib.get('name'),
+                              typeval,
+                              node.attrib.get('direction') or ast.PARAM_DIRECTION_IN,
+                              node.attrib.get('transfer-ownership'),
+                              node.attrib.get('allow-none') == '1',
+                              node.attrib.get('scope'),
+                              node.attrib.get('caller-allocates') == '1')
+        self._parse_generic_attribs(node, param)
+        return param
+
     def _parse_function_common(self, node, klass, parent=None):
         name = node.attrib['name']
         returnnode = node.find(_corens('return-value'))
@@ -323,17 +335,11 @@ class GIRParser(object):
 
         parameters_node = node.find(_corens('parameters'))
         if (parameters_node is not None):
+            paramnode = self._find_first_child(parameters_node, _corens('instance-parameter'))
+            if paramnode:
+                func.instance_parameter = self._parse_parameter(paramnode)
             for paramnode in self._find_children(parameters_node, _corens('parameter')):
-                typeval = self._parse_type(paramnode)
-                param = ast.Parameter(paramnode.attrib.get('name'),
-                                  typeval,
-                                  paramnode.attrib.get('direction') or ast.PARAM_DIRECTION_IN,
-                                  paramnode.attrib.get('transfer-ownership'),
-                                  paramnode.attrib.get('allow-none') == '1',
-                                  paramnode.attrib.get('scope'),
-                                  paramnode.attrib.get('caller-allocates') == '1')
-                self._parse_generic_attribs(paramnode, param)
-                parameters.append(param)
+                parameters.append(self._parse_parameter(paramnode))
             for i, paramnode in enumerate(self._find_children(parameters_node,
                                                               _corens('parameter'))):
                 param = parameters[i]
diff --git a/giscanner/girwriter.py b/giscanner/girwriter.py
index e9910d4..c54a538 100644
--- a/giscanner/girwriter.py
+++ b/giscanner/girwriter.py
@@ -170,7 +170,7 @@ and/or use gtk-doc annotations. ''')
         with self.tagcontext(tag_name, attrs):
             self._write_generic(callable)
             self._write_return_type(callable.retval, parent=callable)
-            self._write_parameters(callable, callable.parameters)
+            self._write_parameters(callable)
 
     def _write_function(self, func, tag_name='function'):
         attrs = []
@@ -206,14 +206,16 @@ and/or use gtk-doc annotations. ''')
             self._write_generic(return_)
             self._write_type(return_.type, function=parent)
 
-    def _write_parameters(self, parent, parameters):
-        if not parameters:
+    def _write_parameters(self, callable):
+        if not callable.parameters and callable.instance_parameter is None:
             return
         with self.tagcontext('parameters'):
-            for parameter in parameters:
-                self._write_parameter(parent, parameter)
+            if callable.instance_parameter:
+                self._write_parameter(callable, callable.instance_parameter, 'instance-parameter')
+            for parameter in callable.parameters:
+                self._write_parameter(callable, parameter)
 
-    def _write_parameter(self, parent, parameter):
+    def _write_parameter(self, parent, parameter, nodename='parameter'):
         attrs = []
         if parameter.argname is not None:
             attrs.append(('name', parameter.argname))
@@ -236,7 +238,7 @@ and/or use gtk-doc annotations. ''')
             attrs.append(('destroy', '%d' % (idx, )))
         if parameter.skip:
             attrs.append(('skip', '1'))
-        with self.tagcontext('parameter', attrs):
+        with self.tagcontext(nodename, attrs):
             self._write_generic(parameter)
             self._write_type(parameter.type, function=parent)
 
@@ -585,4 +587,4 @@ and/or use gtk-doc annotations. ''')
         with self.tagcontext('glib:signal', attrs):
             self._write_generic(signal)
             self._write_return_type(signal.retval)
-            self._write_parameters(signal, signal.parameters)
+            self._write_parameters(signal)
diff --git a/tests/scanner/Annotation-1.0-expected.gir b/tests/scanner/Annotation-1.0-expected.gir
index 0be91d6..bc0ae09 100644
--- a/tests/scanner/Annotation-1.0-expected.gir
+++ b/tests/scanner/Annotation-1.0-expected.gir
@@ -114,6 +114,10 @@ and/or use gtk-doc annotations.  -->
           <type name="GObject.Object" c:type="GObject*"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #GObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
           <parameter name="somearg" transfer-ownership="none" allow-none="1">
             <type name="utf8" c:type="const gchar*"/>
           </parameter>
@@ -126,6 +130,10 @@ and/or use gtk-doc annotations.  -->
           <type name="gint" c:type="gint"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #GObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
           <parameter name="toown"
                      direction="out"
                      caller-allocates="0"
@@ -142,6 +150,10 @@ and/or use gtk-doc annotations.  -->
           <type name="gint" c:type="gint"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #GObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
           <parameter name="toown1"
                      direction="out"
                      caller-allocates="0"
@@ -164,6 +176,10 @@ and/or use gtk-doc annotations.  -->
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #GObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
           <parameter name="nums" transfer-ownership="none">
             <doc xml:whitespace="preserve">Sequence of numbers</doc>
             <array zero-terminated="0" c:type="int*">
@@ -179,6 +195,10 @@ and/or use gtk-doc annotations.  -->
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #GObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
           <parameter name="nums" transfer-ownership="none">
             <doc xml:whitespace="preserve">Sequence of numbers that are zero-terminated</doc>
             <array length="1" zero-terminated="0" c:type="int*">
@@ -198,6 +218,10 @@ and/or use gtk-doc annotations.  -->
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #AnnotationObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
           <parameter name="nums" transfer-ownership="none">
             <doc xml:whitespace="preserve">Sequence of numbers that are zero-terminated</doc>
             <array length="1" zero-terminated="1" c:type="int*">
@@ -217,6 +241,12 @@ and/or use gtk-doc annotations.  -->
           <doc xml:whitespace="preserve">The object</doc>
           <type name="GObject.Object" c:type="GObject*"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #GObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="do_not_use"
               c:identifier="annotation_object_do_not_use"
@@ -226,12 +256,23 @@ and/or use gtk-doc annotations.  -->
           <doc xml:whitespace="preserve">%NULL always</doc>
           <type name="GObject.Object" c:type="GObject*"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #GObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="extra_annos" c:identifier="annotation_object_extra_annos">
         <attribute name="org.foobar" value="testvalue"/>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="foreach" c:identifier="annotation_object_foreach">
         <doc xml:whitespace="preserve">Test taking a call-scoped callback</doc>
@@ -239,6 +280,10 @@ and/or use gtk-doc annotations.  -->
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #AnnotationObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
           <parameter name="func"
                      transfer-ownership="none"
                      scope="call"
@@ -262,6 +307,12 @@ objects.</doc>
             <type name="GObject.Object"/>
           </type>
         </return-value>
+        <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #GObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="get_objects" c:identifier="annotation_object_get_objects">
         <doc xml:whitespace="preserve">This is a test for returning a list of objects.
@@ -273,6 +324,12 @@ intentionally similar example to gtk_container_get_children</doc>
             <type name="Object"/>
           </type>
         </return-value>
+        <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #GObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="get_strings" c:identifier="annotation_object_get_strings">
         <doc xml:whitespace="preserve">This is a test for returning a list of strings, where
@@ -283,11 +340,23 @@ each string needs to be freed.</doc>
             <type name="utf8"/>
           </type>
         </return-value>
+        <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #GObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="hidden_self" c:identifier="annotation_object_hidden_self">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">A #AnnotationObject</doc>
+            <type name="Object" c:type="gpointer"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="in" c:identifier="annotation_object_in">
         <doc xml:whitespace="preserve">This is a test for in arguments</doc>
@@ -296,6 +365,10 @@ each string needs to be freed.</doc>
           <type name="gint" c:type="gint"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #GObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
           <parameter name="inarg" transfer-ownership="none">
             <doc xml:whitespace="preserve">This is an argument test</doc>
             <type name="gint" c:type="int*"/>
@@ -309,6 +382,10 @@ each string needs to be freed.</doc>
           <type name="gint" c:type="gint"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #GObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
           <parameter name="inoutarg"
                      direction="inout"
                      caller-allocates="0"
@@ -325,6 +402,10 @@ each string needs to be freed.</doc>
           <type name="gint" c:type="gint"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #GObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
           <parameter name="inoutarg"
                      direction="inout"
                      caller-allocates="0"
@@ -341,6 +422,10 @@ each string needs to be freed.</doc>
           <type name="gint" c:type="gint"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #GObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
           <parameter name="inoutarg"
                      direction="inout"
                      caller-allocates="0"
@@ -356,12 +441,24 @@ each string needs to be freed.</doc>
           <doc xml:whitespace="preserve">an int</doc>
           <type name="gint" c:type="gint"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #GObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="notrans" c:identifier="annotation_object_notrans">
         <return-value transfer-ownership="none">
           <doc xml:whitespace="preserve">An object, not referenced</doc>
           <type name="GObject.Object" c:type="GObject*"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #GObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="out" c:identifier="annotation_object_out">
         <doc xml:whitespace="preserve">This is a test for out arguments</doc>
@@ -370,6 +467,10 @@ each string needs to be freed.</doc>
           <type name="gint" c:type="gint"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #GObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
           <parameter name="outarg"
                      direction="out"
                      caller-allocates="0"
@@ -385,6 +486,10 @@ each string needs to be freed.</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #AnnotationObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
           <parameter name="argc"
                      direction="inout"
                      caller-allocates="0"
@@ -409,6 +514,10 @@ each string needs to be freed.</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #AnnotationObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
           <parameter name="data" transfer-ownership="none">
             <doc xml:whitespace="preserve">The data</doc>
             <array length="1" zero-terminated="0" c:type="guchar*">
@@ -427,6 +536,10 @@ each string needs to be freed.</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #AnnotationObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
           <parameter name="data" transfer-ownership="none">
             <doc xml:whitespace="preserve">The data</doc>
             <array length="1" zero-terminated="0" c:type="gchar*">
@@ -446,6 +559,10 @@ type.</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #AnnotationObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
           <parameter name="data" transfer-ownership="none">
             <doc xml:whitespace="preserve">The data</doc>
             <array length="1" zero-terminated="0" c:type="gpointer">
@@ -465,6 +582,10 @@ type.</doc>
           <type name="gboolean" c:type="gboolean"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #AnnotationObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
           <parameter name="str_out"
                      direction="out"
                      caller-allocates="0"
@@ -479,6 +600,10 @@ type.</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #GObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
           <parameter name="bytes" transfer-ownership="none">
             <type name="guint8" c:type="guchar*"/>
           </parameter>
@@ -494,6 +619,10 @@ annotation_object_watch_full().</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">A #AnnotationObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
           <parameter name="func" transfer-ownership="none" closure="1">
             <doc xml:whitespace="preserve">The callback</doc>
             <type name="ForeachFunc" c:type="AnnotationForeachFunc"/>
@@ -512,6 +641,10 @@ annotation_object_watch_full().</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">A #AnnotationObject</doc>
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
           <parameter name="func"
                      transfer-ownership="none"
                      scope="notified"
@@ -535,6 +668,9 @@ annotation_object_watch_full().</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <type name="Object" c:type="AnnotationObject*"/>
+          </instance-parameter>
           <parameter name="data" transfer-ownership="none">
             <doc xml:whitespace="preserve">Opaque pointer handle</doc>
             <type name="gpointer" c:type="void*"/>
diff --git a/tests/scanner/Bar-1.0-expected.gir b/tests/scanner/Bar-1.0-expected.gir
index 392a303..ef92fcc 100644
--- a/tests/scanner/Bar-1.0-expected.gir
+++ b/tests/scanner/Bar-1.0-expected.gir
@@ -44,6 +44,9 @@ and/or use gtk-doc annotations.  -->
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="window" transfer-ownership="none">
+            <type name="MutterWindow" c:type="MutterWindow*"/>
+          </instance-parameter>
           <parameter name="v" transfer-ownership="none">
             <type name="guint" c:type="guint"/>
           </parameter>
diff --git a/tests/scanner/Foo-1.0-expected.gir b/tests/scanner/Foo-1.0-expected.gir
index 048ed42..bfab266 100644
--- a/tests/scanner/Foo-1.0-expected.gir
+++ b/tests/scanner/Foo-1.0-expected.gir
@@ -66,6 +66,9 @@ and/or use gtk-doc annotations.  -->
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="b1" transfer-ownership="none">
+            <type name="BRect" c:type="FooBRect*"/>
+          </instance-parameter>
           <parameter name="b2" transfer-ownership="none">
             <type name="BRect" c:type="FooBRect*"/>
           </parameter>
@@ -96,6 +99,11 @@ and/or use gtk-doc annotations.  -->
         <return-value transfer-ownership="none">
           <type name="gint" c:type="int"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="bunion" transfer-ownership="none">
+            <type name="BUnion" c:type="FooBUnion*"/>
+          </instance-parameter>
+        </parameters>
       </method>
     </union>
     <record name="Boxed"
@@ -112,6 +120,11 @@ and/or use gtk-doc annotations.  -->
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="boxed" transfer-ownership="none">
+            <type name="Boxed" c:type="FooBoxed*"/>
+          </instance-parameter>
+        </parameters>
       </method>
     </record>
     <class name="Buffer"
@@ -126,6 +139,11 @@ and/or use gtk-doc annotations.  -->
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="buffer" transfer-ownership="none">
+            <type name="Buffer" c:type="FooBuffer*"/>
+          </instance-parameter>
+        </parameters>
       </method>
     </class>
     <record name="BufferClass"
@@ -158,6 +176,11 @@ and/or use gtk-doc annotations.  -->
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="dbusdata" transfer-ownership="none">
+            <type name="DBusData" c:type="FooDBusData*"/>
+          </instance-parameter>
+        </parameters>
       </method>
     </record>
     <constant name="DEFINE_SHOULD_BE_EXPOSED"
@@ -314,6 +337,11 @@ and/or use gtk-doc annotations.  -->
         <return-value transfer-ownership="full">
           <type name="ForeignStruct" c:type="FooForeignStruct*"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="original" transfer-ownership="none">
+            <type name="ForeignStruct" c:type="FooForeignStruct*"/>
+          </instance-parameter>
+        </parameters>
       </method>
     </record>
     <interface name="Interface"
@@ -338,6 +366,9 @@ and/or use gtk-doc annotations.  -->
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="self" transfer-ownership="none">
+            <type name="Interface" c:type="FooInterface*"/>
+          </instance-parameter>
           <parameter name="x" transfer-ownership="none">
             <type name="gint" c:type="int"/>
           </parameter>
@@ -348,6 +379,9 @@ and/or use gtk-doc annotations.  -->
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="iface" transfer-ownership="none">
+            <type name="Interface" c:type="FooInterface*"/>
+          </instance-parameter>
           <parameter name="x" transfer-ownership="none">
             <type name="gint" c:type="int"/>
           </parameter>
@@ -424,6 +458,9 @@ uses a C sugar return type.</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <type name="Object" c:type="FooObject*"/>
+          </instance-parameter>
           <parameter name="offset" transfer-ownership="none">
             <doc xml:whitespace="preserve">offset</doc>
             <type name="gint" c:type="int"/>
@@ -439,6 +476,9 @@ uses a C sugar return type.</doc>
           <type name="gboolean" c:type="gboolean"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <type name="Object" c:type="FooObject*"/>
+          </instance-parameter>
           <parameter name="first_param" transfer-ownership="none">
             <type name="gint" c:type="int"/>
           </parameter>
@@ -451,6 +491,9 @@ uses a C sugar return type.</doc>
           <type name="OtherObject" c:type="FooOtherObject*"/>
         </return-value>
         <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <type name="Object" c:type="FooObject*"/>
+          </instance-parameter>
           <parameter name="x" transfer-ownership="none">
             <type name="gint" c:type="int"/>
           </parameter>
@@ -460,23 +503,42 @@ uses a C sugar return type.</doc>
         <return-value transfer-ownership="full">
           <type name="utf8" c:type="char*"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <type name="Object" c:type="FooObject*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="external_type" c:identifier="foo_object_external_type">
         <return-value transfer-ownership="none">
           <doc xml:whitespace="preserve">%NULL always</doc>
           <type name="Utility.Object" c:type="UtilityObject*"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #FooObject</doc>
+            <type name="Object" c:type="FooObject*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="get_name" c:identifier="foo_object_get_name">
         <return-value transfer-ownership="none">
           <type name="utf8" c:type="const char*"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <type name="Object" c:type="FooObject*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="handle_glyph" c:identifier="foo_object_handle_glyph">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <type name="Object" c:type="FooObject*"/>
+          </instance-parameter>
           <parameter name="glyph" transfer-ownership="none">
             <type name="Utility.Glyph" c:type="UtilityGlyph"/>
           </parameter>
@@ -487,6 +549,9 @@ uses a C sugar return type.</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <type name="Object" c:type="FooObject*"/>
+          </instance-parameter>
           <parameter name="time" transfer-ownership="none">
             <type name="glong" c:type="time_t"/>
           </parameter>
@@ -500,6 +565,9 @@ uses a C sugar return type.</doc>
           <type name="ObjectCookie" c:type="FooObjectCookie"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <type name="Object" c:type="FooObject*"/>
+          </instance-parameter>
           <parameter name="target" transfer-ownership="none">
             <type name="utf8" c:type="const char*"/>
           </parameter>
@@ -511,6 +579,10 @@ uses a C sugar return type.</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">obj</doc>
+            <type name="Object" c:type="FooObject*"/>
+          </instance-parameter>
           <parameter name="offset" transfer-ownership="none">
             <doc xml:whitespace="preserve">offset</doc>
             <type name="gint" c:type="int"/>
@@ -528,6 +600,12 @@ uses a C sugar return type.</doc>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <doc xml:whitespace="preserve">obj</doc>
+            <type name="Object" c:type="FooObject*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="take_all"
               c:identifier="foo_object_take_all"
@@ -536,6 +614,9 @@ uses a C sugar return type.</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <type name="Object" c:type="FooObject*"/>
+          </instance-parameter>
           <parameter name="x" transfer-ownership="none">
             <type name="gint" c:type="int"/>
           </parameter>
@@ -550,6 +631,9 @@ uses a C sugar return type.</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <type name="Object" c:type="FooObject*"/>
+          </instance-parameter>
           <parameter name="data" transfer-ownership="none">
             <type name="gpointer" c:type="void*"/>
           </parameter>
@@ -563,6 +647,9 @@ uses a C sugar return type.</doc>
           <type name="gboolean" c:type="gboolean"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <type name="Object" c:type="FooObject*"/>
+          </instance-parameter>
           <parameter name="first_param" transfer-ownership="none">
             <type name="gint" c:type="int"/>
           </parameter>
@@ -682,6 +769,13 @@ uses a C sugar return type.</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="r1"
+                              direction="inout"
+                              caller-allocates="0"
+                              transfer-ownership="full">
+            <doc xml:whitespace="preserve">add to this rect</doc>
+            <type name="Rectangle" c:type="FooRectangle*"/>
+          </instance-parameter>
           <parameter name="r2" transfer-ownership="none">
             <doc xml:whitespace="preserve">source rectangle</doc>
             <type name="Rectangle" c:type="const FooRectangle*"/>
@@ -768,17 +862,30 @@ exposed to language bindings.</doc>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="self" transfer-ownership="none">
+            <type name="SubInterface" c:type="FooSubInterface*"/>
+          </instance-parameter>
+        </parameters>
       </virtual-method>
       <virtual-method name="do_bar" invoker="do_bar">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="self" transfer-ownership="none">
+            <type name="SubInterface" c:type="FooSubInterface*"/>
+          </instance-parameter>
+        </parameters>
       </virtual-method>
       <virtual-method name="do_baz" invoker="do_baz">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="self" transfer-ownership="none">
+            <type name="SubInterface" c:type="FooSubInterface*"/>
+          </instance-parameter>
           <parameter name="callback"
                      transfer-ownership="none"
                      scope="call"
@@ -795,6 +902,9 @@ exposed to language bindings.</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="self" transfer-ownership="none">
+            <type name="SubInterface" c:type="FooSubInterface*"/>
+          </instance-parameter>
           <parameter transfer-ownership="none">
             <type name="gint" c:type="int"/>
           </parameter>
@@ -807,12 +917,20 @@ exposed to language bindings.</doc>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="self" transfer-ownership="none">
+            <type name="SubInterface" c:type="FooSubInterface*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="do_baz" c:identifier="foo_sub_interface_do_baz">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="self" transfer-ownership="none">
+            <type name="SubInterface" c:type="FooSubInterface*"/>
+          </instance-parameter>
           <parameter name="callback"
                      transfer-ownership="none"
                      scope="call"
@@ -829,6 +947,9 @@ exposed to language bindings.</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="self" transfer-ownership="none">
+            <type name="SubInterface" c:type="FooSubInterface*"/>
+          </instance-parameter>
           <parameter transfer-ownership="none">
             <type name="gint" c:type="int"/>
           </parameter>
diff --git a/tests/scanner/GetType-1.0-expected.gir b/tests/scanner/GetType-1.0-expected.gir
index 3b1dd19..872ebe4 100644
--- a/tests/scanner/GetType-1.0-expected.gir
+++ b/tests/scanner/GetType-1.0-expected.gir
@@ -53,6 +53,12 @@ arguments.</doc>
           <doc xml:whitespace="preserve">0</doc>
           <type name="GType" c:type="GType"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <doc xml:whitespace="preserve">self</doc>
+            <type name="Object" c:type="GetTypeObject*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <field name="parent_instance">
         <type name="GObject.Object" c:type="GObject"/>
diff --git a/tests/scanner/Regress-1.0-expected.gir b/tests/scanner/Regress-1.0-expected.gir
index f3f9a03..e5f9e3b 100644
--- a/tests/scanner/Regress-1.0-expected.gir
+++ b/tests/scanner/Regress-1.0-expected.gir
@@ -212,12 +212,20 @@ use it should be.</doc>
         <return-value transfer-ownership="full">
           <type name="TestBoxed" c:type="RegressTestBoxed*"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="boxed" transfer-ownership="none">
+            <type name="TestBoxed" c:type="RegressTestBoxed*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="equals" c:identifier="regress_test_boxed_equals">
         <return-value transfer-ownership="none">
           <type name="gboolean" c:type="gboolean"/>
         </return-value>
         <parameters>
+          <instance-parameter name="boxed" transfer-ownership="none">
+            <type name="TestBoxed" c:type="RegressTestBoxed*"/>
+          </instance-parameter>
           <parameter name="other" transfer-ownership="none">
             <type name="TestBoxed" c:type="RegressTestBoxed*"/>
           </parameter>
@@ -252,6 +260,11 @@ use it should be.</doc>
         <return-value transfer-ownership="full">
           <type name="TestBoxedB" c:type="RegressTestBoxedB*"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="boxed" transfer-ownership="none">
+            <type name="TestBoxedB" c:type="RegressTestBoxedB*"/>
+          </instance-parameter>
+        </parameters>
       </method>
     </record>
     <record name="TestBoxedC"
@@ -293,16 +306,31 @@ use it should be.</doc>
         <return-value transfer-ownership="full">
           <type name="TestBoxedD" c:type="RegressTestBoxedD*"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="boxed" transfer-ownership="none">
+            <type name="TestBoxedD" c:type="RegressTestBoxedD*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="free" c:identifier="regress_test_boxed_d_free">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="boxed" transfer-ownership="none">
+            <type name="TestBoxedD" c:type="RegressTestBoxedD*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="get_magic" c:identifier="regress_test_boxed_d_get_magic">
         <return-value transfer-ownership="none">
           <type name="gint" c:type="int"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="boxed" transfer-ownership="none">
+            <type name="TestBoxedD" c:type="RegressTestBoxedD*"/>
+          </instance-parameter>
+        </parameters>
       </method>
     </record>
     <record name="TestBoxedPrivate"
@@ -569,12 +597,26 @@ use it should be.</doc>
           <type name="TestFundamentalObject"
                 c:type="RegressTestFundamentalObject*"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="fundamental_object"
+                              transfer-ownership="none">
+            <type name="TestFundamentalObject"
+                  c:type="RegressTestFundamentalObject*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="unref"
               c:identifier="regress_test_fundamental_object_unref">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="fundamental_object"
+                              transfer-ownership="none">
+            <type name="TestFundamentalObject"
+                  c:type="RegressTestFundamentalObject*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <field name="instance">
         <type name="GObject.TypeInstance" c:type="GTypeInstance"/>
@@ -778,6 +820,9 @@ use it should be.</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <type name="TestObj" c:type="RegressTestObj*"/>
+          </instance-parameter>
           <parameter name="two" transfer-ownership="none" allow-none="1">
             <doc xml:whitespace="preserve">Another object</doc>
             <type name="TestObj" c:type="RegressTestObj*"/>
@@ -792,6 +837,9 @@ case.</doc>
           <type name="gint" c:type="int"/>
         </return-value>
         <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <type name="TestObj" c:type="RegressTestObj*"/>
+          </instance-parameter>
           <parameter name="somestr" transfer-ownership="none">
             <doc xml:whitespace="preserve">Meaningless string</doc>
             <type name="utf8" c:type="const char*"/>
@@ -806,6 +854,10 @@ case.</doc>
           <type name="gint" c:type="int"/>
         </return-value>
         <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <doc xml:whitespace="preserve">A #RegressTestObj</doc>
+            <type name="TestObj" c:type="RegressTestObj*"/>
+          </instance-parameter>
           <parameter name="somestr" transfer-ownership="none">
             <doc xml:whitespace="preserve">Meaningless string</doc>
             <type name="utf8" c:type="const char*"/>
@@ -817,35 +869,66 @@ case.</doc>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <type name="TestObj" c:type="RegressTestObj*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="emit_sig_with_int64"
               c:identifier="regress_test_obj_emit_sig_with_int64">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <type name="TestObj" c:type="RegressTestObj*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="emit_sig_with_obj"
               c:identifier="regress_test_obj_emit_sig_with_obj">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <type name="TestObj" c:type="RegressTestObj*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="emit_sig_with_uint64"
               c:identifier="regress_test_obj_emit_sig_with_uint64">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <type name="TestObj" c:type="RegressTestObj*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="forced_method" c:identifier="regress_forced_method">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <doc xml:whitespace="preserve">A #RegressTestObj</doc>
+            <type name="TestObj" c:type="RegressTestObj*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="instance_method"
               c:identifier="regress_test_obj_instance_method">
         <return-value transfer-ownership="none">
           <type name="gint" c:type="int"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <type name="TestObj" c:type="RegressTestObj*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="instance_method_callback"
               c:identifier="regress_test_obj_instance_method_callback">
@@ -853,6 +936,9 @@ case.</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <type name="TestObj" c:type="RegressTestObj*"/>
+          </instance-parameter>
           <parameter name="callback"
                      transfer-ownership="none"
                      allow-none="1"
@@ -866,6 +952,9 @@ case.</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <type name="TestObj" c:type="RegressTestObj*"/>
+          </instance-parameter>
           <parameter name="bare" transfer-ownership="none" allow-none="1">
             <type name="GObject.Object" c:type="GObject*"/>
           </parameter>
@@ -880,6 +969,10 @@ case.</doc>
           <type name="gboolean" c:type="gboolean"/>
         </return-value>
         <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <doc xml:whitespace="preserve">A #RegressTestObj.</doc>
+            <type name="TestObj" c:type="RegressTestObj*"/>
+          </instance-parameter>
           <parameter name="a" transfer-ownership="none">
             <doc xml:whitespace="preserve">Parameter.</doc>
             <type name="gint" c:type="gint"/>
@@ -929,6 +1022,10 @@ case.</doc>
           <type name="gboolean" c:type="gboolean"/>
         </return-value>
         <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <doc xml:whitespace="preserve">A #RegressTestObj.</doc>
+            <type name="TestObj" c:type="RegressTestObj*"/>
+          </instance-parameter>
           <parameter name="a" transfer-ownership="none">
             <doc xml:whitespace="preserve">Parameter.</doc>
             <type name="gint" c:type="gint"/>
@@ -978,6 +1075,10 @@ case.</doc>
           <type name="gboolean" c:type="gboolean"/>
         </return-value>
         <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <doc xml:whitespace="preserve">A #RegressTestObj.</doc>
+            <type name="TestObj" c:type="RegressTestObj*"/>
+          </instance-parameter>
           <parameter name="a" transfer-ownership="none">
             <doc xml:whitespace="preserve">Parameter.</doc>
             <type name="gint" c:type="gint"/>
@@ -1026,6 +1127,10 @@ case.</doc>
           <type name="gboolean" c:type="gboolean"/>
         </return-value>
         <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #RegressTestObj</doc>
+            <type name="TestObj" c:type="RegressTestObj*"/>
+          </instance-parameter>
           <parameter name="a" transfer-ownership="none">
             <doc xml:whitespace="preserve">Parameter.</doc>
             <type name="gint" c:type="gint"/>
@@ -1075,6 +1180,10 @@ raise an error.</doc>
           <type name="gboolean" c:type="gboolean"/>
         </return-value>
         <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <doc xml:whitespace="preserve">a #RegressTestObj</doc>
+            <type name="TestObj" c:type="RegressTestObj*"/>
+          </instance-parameter>
           <parameter name="a" transfer-ownership="none">
             <doc xml:whitespace="preserve">Parameter.</doc>
             <type name="gint" c:type="gint"/>
@@ -1087,6 +1196,10 @@ raise an error.</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <doc xml:whitespace="preserve">A #RegressTestObj</doc>
+            <type name="TestObj" c:type="RegressTestObj*"/>
+          </instance-parameter>
           <parameter name="x" transfer-ownership="none">
             <type name="gint" c:type="int"/>
           </parameter>
@@ -1124,6 +1237,10 @@ raise an error.</doc>
           <type name="gboolean" c:type="gboolean"/>
         </return-value>
         <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <doc xml:whitespace="preserve">A #RegressTestObj</doc>
+            <type name="TestObj" c:type="RegressTestObj*"/>
+          </instance-parameter>
           <parameter name="x" transfer-ownership="none">
             <type name="gint" c:type="int"/>
           </parameter>
@@ -1507,12 +1624,20 @@ the introspection client langage.</doc>
         <return-value transfer-ownership="full">
           <type name="TestSimpleBoxedA" c:type="RegressTestSimpleBoxedA*"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="a" transfer-ownership="none">
+            <type name="TestSimpleBoxedA" c:type="RegressTestSimpleBoxedA*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="equals" c:identifier="regress_test_simple_boxed_a_equals">
         <return-value transfer-ownership="none">
           <type name="gboolean" c:type="gboolean"/>
         </return-value>
         <parameters>
+          <instance-parameter name="a" transfer-ownership="none">
+            <type name="TestSimpleBoxedA" c:type="RegressTestSimpleBoxedA*"/>
+          </instance-parameter>
           <parameter name="other_a" transfer-ownership="none">
             <type name="TestSimpleBoxedA" c:type="RegressTestSimpleBoxedA*"/>
           </parameter>
@@ -1541,6 +1666,11 @@ the introspection client langage.</doc>
         <return-value transfer-ownership="full">
           <type name="TestSimpleBoxedB" c:type="RegressTestSimpleBoxedB*"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="b" transfer-ownership="none">
+            <type name="TestSimpleBoxedB" c:type="RegressTestSimpleBoxedB*"/>
+          </instance-parameter>
+        </parameters>
       </method>
     </record>
     <callback name="TestSimpleCallback" c:type="RegressTestSimpleCallback">
@@ -1567,6 +1697,10 @@ the introspection client langage.</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="a" transfer-ownership="none">
+            <doc xml:whitespace="preserve">the structure</doc>
+            <type name="TestStructA" c:type="RegressTestStructA*"/>
+          </instance-parameter>
           <parameter name="a_out"
                      direction="out"
                      caller-allocates="1"
@@ -1608,6 +1742,10 @@ the introspection client langage.</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="b" transfer-ownership="none">
+            <doc xml:whitespace="preserve">the structure</doc>
+            <type name="TestStructB" c:type="RegressTestStructB*"/>
+          </instance-parameter>
           <parameter name="b_out"
                      direction="out"
                      caller-allocates="1"
@@ -1726,6 +1864,12 @@ the introspection client langage.</doc>
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="str" transfer-ownership="none">
+            <type name="TestStructFixedArray"
+                  c:type="RegressTestStructFixedArray*"/>
+          </instance-parameter>
+        </parameters>
       </method>
     </record>
     <class name="TestSubObj"
@@ -1745,11 +1889,21 @@ the introspection client langage.</doc>
         <return-value transfer-ownership="none">
           <type name="gint" c:type="int"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <type name="TestSubObj" c:type="RegressTestSubObj*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="unset_bare" c:identifier="regress_test_sub_obj_unset_bare">
         <return-value transfer-ownership="none">
           <type name="none" c:type="void"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <type name="TestSubObj" c:type="RegressTestSubObj*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <field name="parent_instance">
         <type name="TestObj" c:type="RegressTestObj"/>
@@ -1790,6 +1944,11 @@ the introspection client langage.</doc>
         <return-value transfer-ownership="none">
           <type name="gboolean" c:type="gboolean"/>
         </return-value>
+        <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <type name="TestWi8021x" c:type="RegressTestWi8021x*"/>
+          </instance-parameter>
+        </parameters>
       </method>
       <method name="set_testbool"
               c:identifier="regress_test_wi_802_1x_set_testbool">
@@ -1797,6 +1956,9 @@ the introspection client langage.</doc>
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="obj" transfer-ownership="none">
+            <type name="TestWi8021x" c:type="RegressTestWi8021x*"/>
+          </instance-parameter>
           <parameter name="v" transfer-ownership="none">
             <type name="gboolean" c:type="gboolean"/>
           </parameter>
diff --git a/tests/scanner/TestInherit-1.0-expected.gir b/tests/scanner/TestInherit-1.0-expected.gir
index 6b16ab7..1f1a328 100644
--- a/tests/scanner/TestInherit-1.0-expected.gir
+++ b/tests/scanner/TestInherit-1.0-expected.gir
@@ -29,6 +29,9 @@ and/or use gtk-doc annotations.  -->
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="drawable" transfer-ownership="none">
+            <type name="Drawable" c:type="TestInheritDrawable*"/>
+          </instance-parameter>
           <parameter name="x" transfer-ownership="none">
             <type name="gint" c:type="int"/>
           </parameter>
@@ -41,6 +44,9 @@ and/or use gtk-doc annotations.  -->
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="drawable" transfer-ownership="none">
+            <type name="Drawable" c:type="TestInheritDrawable*"/>
+          </instance-parameter>
           <parameter name="x" transfer-ownership="none">
             <type name="gint" c:type="int"/>
           </parameter>
@@ -52,6 +58,9 @@ and/or use gtk-doc annotations.  -->
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="drawable" transfer-ownership="none">
+            <type name="Drawable" c:type="TestInheritDrawable*"/>
+          </instance-parameter>
           <parameter name="x"
                      direction="out"
                      caller-allocates="0"
@@ -71,6 +80,9 @@ and/or use gtk-doc annotations.  -->
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="drawable" transfer-ownership="none">
+            <type name="Drawable" c:type="TestInheritDrawable*"/>
+          </instance-parameter>
           <parameter name="width"
                      direction="out"
                      caller-allocates="0"
diff --git a/tests/scanner/Utility-1.0-expected.gir b/tests/scanner/Utility-1.0-expected.gir
index 3d73880..1f9f6a7 100644
--- a/tests/scanner/Utility-1.0-expected.gir
+++ b/tests/scanner/Utility-1.0-expected.gir
@@ -80,6 +80,9 @@ and/or use gtk-doc annotations.  -->
           <type name="none" c:type="void"/>
         </return-value>
         <parameters>
+          <instance-parameter name="object" transfer-ownership="none">
+            <type name="Object" c:type="UtilityObject*"/>
+          </instance-parameter>
           <parameter name="path" transfer-ownership="none">
             <type name="utf8" c:type="const char*"/>
           </parameter>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]