summaryrefslogtreecommitdiff
path: root/plugins/yaml/python/tree.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/python/tree.c
parentaded4e75efc21319d5a777bf53bc087587f0740c (diff)
Stuck to the Yaml specifications a little bit more.
Diffstat (limited to 'plugins/yaml/python/tree.c')
-rw-r--r--plugins/yaml/python/tree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/yaml/python/tree.c b/plugins/yaml/python/tree.c
index c23406a..c39c296 100644
--- a/plugins/yaml/python/tree.c
+++ b/plugins/yaml/python/tree.c
@@ -69,10 +69,10 @@ static PyObject *py_yaml_tree_new(PyTypeObject *type, PyObject *args, PyObject *
int ret; /* Bilan de lecture des args. */
size_t count; /* Nombre d'éléments présents */
GYamlLine **lines; /* Lignes au format Yaml */
+ GYamlTree *tree; /* Création GLib à transmettre */
size_t i; /* Boucle de parcours #1 */
PyObject *item; /* Elément de la liste fournie */
size_t k; /* Boucle de parcours #2 */
- GYamlTree *tree; /* Création GLib à transmettre */
#define YAML_TREE_DOC \
"YamlTree offers a hierarchical access to Yaml lines as a tree.\n" \
@@ -90,6 +90,8 @@ static PyObject *py_yaml_tree_new(PyTypeObject *type, PyObject *args, PyObject *
lines = (GYamlLine **)malloc(count * sizeof(GYamlLine *));
+ tree = NULL;
+
for (i = 0; i < count; i++)
{
item = PyTuple_GetItem(tuple, i);