diff options
Diffstat (limited to 'plugins/yaml/python/tree.c')
-rw-r--r-- | plugins/yaml/python/tree.c | 4 |
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); |