move "transfer" and "null-ok" attributes from <function> to <return-value>
authorTommi Komulainen <tommi.komulainen@iki.fi>
Sun, 12 Oct 2008 21:07:39 +0000 (21:07 +0000)
committerTommi Komulainen <tko@src.gnome.org>
Sun, 12 Oct 2008 21:07:39 +0000 (21:07 +0000)
2008-10-12  Tommi Komulainen  <tommi.komulainen@iki.fi>

* tools/generate.c (write_callable_info): move "transfer" and
"null-ok" attributes from <function> to <return-value> element

svn path=/trunk/; revision=691

ChangeLog
tools/generate.c

index 176b447..400c374 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,11 @@
 
 2008-10-12  Tommi Komulainen  <tommi.komulainen@iki.fi>
 
+       * tools/generate.c (write_callable_info): move "transfer" and
+       "null-ok" attributes from <function> to <return-value> element
+
+2008-10-12  Tommi Komulainen  <tommi.komulainen@iki.fi>
+
        * girepository/girparser.c (start_return_value): handle
        "transfer-ownership" attribute
 
index 8e25d33..04cb87c 100644 (file)
@@ -239,6 +239,10 @@ write_callable_info (const gchar    *namespace,
 
   type = g_callable_info_get_return_type (info);
 
+  g_fprintf (file, ">\n");
+
+  g_fprintf (file, "%*s  <return-value", indent, "");
+
   if (g_type_info_is_pointer (type))
     {
       switch (g_callable_info_get_caller_owns (info))
@@ -255,14 +259,12 @@ write_callable_info (const gchar    *namespace,
          g_assert_not_reached ();
        }
     }
-
-  g_fprintf (file, ">\n");
-
-  g_fprintf (file, "%*s  <return-value>\n", indent, "");
   
   if (g_callable_info_may_return_null (info))
     g_fprintf (file, " null-ok=\"1\"");
 
+  g_fprintf (file, ">\n");
+
   g_fprintf (file, "%*s  <type name=\"", indent + 2, "");
 
   write_type_info (namespace, type, file);