[gnome-builder] libide: make things more bindable from vala



commit 06821eb1021d480982b11e64facae724a2a5d27b
Author: Christian Hergert <christian hergert me>
Date:   Sat Sep 26 04:35:36 2015 -0700

    libide: make things more bindable from vala

 libide/ide-symbol-node.c |    7 ++++---
 libide/ide-symbol-tree.c |    4 +++-
 libide/ide-symbol.c      |   11 +++++++++++
 3 files changed, 18 insertions(+), 4 deletions(-)
---
diff --git a/libide/ide-symbol-node.c b/libide/ide-symbol-node.c
index 74fbdaf..357ba58 100644
--- a/libide/ide-symbol-node.c
+++ b/libide/ide-symbol-node.c
@@ -91,6 +91,7 @@ ide_symbol_node_set_property (GObject      *object,
   switch (prop_id)
     {
     case PROP_NAME:
+      g_free (priv->name);
       priv->name = g_value_dup_string (value);
       break;
 
@@ -121,7 +122,7 @@ ide_symbol_node_class_init (IdeSymbolNodeClass *klass)
                          "Name",
                          "Name",
                          NULL,
-                         (G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
+                         (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   gParamSpecs [PROP_KIND] =
     g_param_spec_enum ("kind",
@@ -129,7 +130,7 @@ ide_symbol_node_class_init (IdeSymbolNodeClass *klass)
                        "Kind",
                        IDE_TYPE_SYMBOL_KIND,
                        IDE_SYMBOL_NONE,
-                       (G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
+                       (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   gParamSpecs [PROP_FLAGS] =
     g_param_spec_flags ("flags",
@@ -137,7 +138,7 @@ ide_symbol_node_class_init (IdeSymbolNodeClass *klass)
                         "Flags",
                         IDE_TYPE_SYMBOL_FLAGS,
                         IDE_SYMBOL_FLAGS_NONE,
-                        (G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
+                        (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
   g_object_class_install_properties (object_class, LAST_PROP, gParamSpecs);
 }
diff --git a/libide/ide-symbol-tree.c b/libide/ide-symbol-tree.c
index c009d4d..a33bc2e 100644
--- a/libide/ide-symbol-tree.c
+++ b/libide/ide-symbol-tree.c
@@ -27,6 +27,8 @@ ide_symbol_tree_default_init (IdeSymbolTreeInterface *iface)
 
 /**
  * ide_symbol_tree_get_n_children:
+ * @self: An @IdeSymbolTree
+ * @node: (allow-none): An #IdeSymbolNode or %NULL.
  *
  * Get the number of children of @node. If @node is NULL, the root node
  * is assumed.
@@ -46,7 +48,7 @@ ide_symbol_tree_get_n_children (IdeSymbolTree *self,
 /**
  * ide_symbol_tree_get_nth_child:
  * @self: An #IdeSymbolTree.
- * @node: (nullable): an #IdeSymboNode
+ * @node: (allow-none): an #IdeSymboNode
  * @nth: the nth child to retrieve.
  *
  * Gets the @nth child node of @node.
diff --git a/libide/ide-symbol.c b/libide/ide-symbol.c
index e4ec9c6..077cdf2 100644
--- a/libide/ide-symbol.c
+++ b/libide/ide-symbol.c
@@ -40,6 +40,17 @@ G_DEFINE_BOXED_TYPE (IdeSymbol, ide_symbol, ide_symbol_ref, ide_symbol_unref)
 
 EGG_DEFINE_COUNTER (instances, "IdeSymbol", "Instances", "Number of symbol instances")
 
+/**
+ * ide_symbol_new:
+ * @name: the symbol name
+ * @kind: the symbol kind
+ * @flags: the symbol flags
+ * @declaration_location: (allow-none): the declaration location
+ * @definition_location: (allow-none): the definition location
+ * @canonical_location: (allow-none): the canonical location
+ *
+ * Returns: (transfer full): a new #IdeSymbol.
+ */
 IdeSymbol *
 ide_symbol_new (const gchar       *name,
                 IdeSymbolKind      kind,


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