summaryrefslogtreecommitdiff
path: root/plugins/yaml/node.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-01-04 13:54:17 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-01-04 13:54:17 (GMT)
commit4b54747c0ee3736591b3fb38b156837b0958b1cc (patch)
tree618a8454446f4f8f25aa5f7817c72bbcc706ae4d /plugins/yaml/node.c
parentaded4e75efc21319d5a777bf53bc087587f0740c (diff)
Stuck to the Yaml specifications a little bit more.
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.*