summaryrefslogtreecommitdiff
path: root/plugins/yaml/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/yaml/node.c')
-rw-r--r--plugins/yaml/node.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/plugins/yaml/node.c b/plugins/yaml/node.c
index d35de9c..5f596c1 100644
--- a/plugins/yaml/node.c
+++ b/plugins/yaml/node.c
@@ -87,6 +87,7 @@ static void g_yaml_node_class_init(GYamlNodeClass *klass)
static void g_yaml_node_init(GYamlNode *node)
{
+ node->line = NULL;
}
@@ -105,6 +106,8 @@ static void g_yaml_node_init(GYamlNode *node)
static void g_yaml_node_dispose(GYamlNode *node)
{
+ g_clear_object(&node->line);
+
G_OBJECT_CLASS(g_yaml_node_parent_class)->dispose(G_OBJECT(node));
}
@@ -131,6 +134,32 @@ static void g_yaml_node_finalize(GYamlNode *node)
/******************************************************************************
* *
+* Paramètres : node = noeud d'arborescence Yaml à consulter. *
+* *
+* Description : Fournit la ligne d'origine associée à un noeud. *
+* *
+* Retour : Ligne Yaml à l'origine du noeud. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GYamlLine *g_yaml_node_get_yaml_line(const GYamlNode *node)
+{
+ GYamlLine *result; /* Ligne d'origine à renvoyer */
+
+ result = node->line;
+
+ if (result != NULL)
+ g_object_ref(G_OBJECT(result));
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : node = noeud d'arborescence Yaml à consulter. *
* path = chemin d'accès à parcourir. *
* prepare = indication sur une préparation d'un prochain appel.*