diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2023-05-24 00:24:00 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2023-05-24 00:26:23 (GMT) |
commit | 9f4abb8a20871c64b33f88ad5538bbbe111c1d4c (patch) | |
tree | 6fede4c409ba09151b79e88ee3ffe1831be6727e /plugins/yaml/collection.c | |
parent | 62f073f9a5eb039d8bc5b6d304fca484d4198a9f (diff) |
Update the YAML Python bindings code.
Diffstat (limited to 'plugins/yaml/collection.c')
-rw-r--r-- | plugins/yaml/collection.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/plugins/yaml/collection.c b/plugins/yaml/collection.c index 03ab071..cdc63d9 100644 --- a/plugins/yaml/collection.c +++ b/plugins/yaml/collection.c @@ -180,7 +180,34 @@ GYamlCollection *g_yaml_collection_new(bool seq) result = g_object_new(G_TYPE_YAML_COLLEC, NULL); - result->is_seq = seq; + if (!g_yaml_collection_create(result, seq)) + g_clear_object(&result); + + return result; + +} + + +/****************************************************************************** +* * +* Paramètres : collec = noeud d'arborescence YAML à initialiser pleinement. * +* seq = indique la nature de la future collection. * +* * +* Description : Met en place une collection de noeuds YAML. * +* * +* Retour : Bilan de l'opération. * +* * +* Remarques : - * +* * +******************************************************************************/ + +bool g_yaml_collection_create(GYamlCollection *collec, bool seq) +{ + bool result; /* Bilan à retourner */ + + result = true; + + collec->is_seq = seq; return result; |