[gobject-introspection] Use a default value for transfer-ownership in properties.



commit 00f5d36cd2aff9d1264841ee02e132aa03f1407c
Author: Tomeu Vizoso <tomeu vizoso collabora co uk>
Date:   Tue Jun 8 19:20:06 2010 +0200

    Use a default value for transfer-ownership in properties.

 girepository/girparser.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/girepository/girparser.c b/girepository/girparser.c
index 65f038c..9823228 100644
--- a/girepository/girparser.c
+++ b/girepository/girparser.c
@@ -847,13 +847,16 @@ parse_property_transfer (GIrNodeProperty *property,
 {
   if (transfer == NULL)
   {
+#if 0
     GIrNodeInterface *iface = (GIrNodeInterface *)CURRENT_NODE (ctx);
 
-    g_warning ("required attribute 'transfer-ownership' for property '%s' in "
-               "type '%s.%s'", property->node.name, ctx->namespace,
-               iface->node.name);
+    g_debug ("required attribute 'transfer-ownership' is missing from "
+             "property '%s' in type '%s.%s'. Assuming 'none'\n",
+             property->node.name, ctx->namespace, iface->node.name);
+#endif
+    transfer = "none";
   }
-  else if (strcmp (transfer, "none") == 0)
+  if (strcmp (transfer, "none") == 0)
     {
       property->transfer = FALSE;
       property->shallow_transfer = FALSE;



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