diff options
Diffstat (limited to 'plugins/yaml/python/module.c')
-rw-r--r-- | plugins/yaml/python/module.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/plugins/yaml/python/module.c b/plugins/yaml/python/module.c index 90823e8..3d6a4e8 100644 --- a/plugins/yaml/python/module.c +++ b/plugins/yaml/python/module.c @@ -2,7 +2,7 @@ /* Chrysalide - Outil d'analyse de fichiers binaires * module.c - intégration du répertoire yaml en tant que module * - * Copyright (C) 2019-2020 Cyrille Bagard + * Copyright (C) 2019-2023 Cyrille Bagard * * This file is part of Chrysalide. * @@ -34,12 +34,9 @@ #include "collection.h" -#include "line.h" #include "node.h" #include "pair.h" -#include "reader.h" -#include "scalar.h" -#include "tree.h" +#include "parser.h" @@ -62,7 +59,12 @@ bool add_yaml_module_to_python_module(void) PyObject *module; /* Sous-module mis en place */ #define PYCHRYSALIDE_PLUGINS_YAML_DOC \ - "yaml is a module providing access to Yaml content." + "yaml is a module providing access to YAML content.\n" \ + "\n" \ + "The parsing is provided by an external library: " \ + " https://github.com/yaml/libyaml . The Python module only" \ + " creates some glue to access YAML content from GObject" \ + " code." static PyModuleDef py_chrysalide_yaml_module = { @@ -105,19 +107,12 @@ bool add_yaml_module_to_python_module(void) bool populate_yaml_module(void) { bool result; /* Bilan à retourner */ - PyObject *module; /* Module à recompléter */ - result = true; + result = populate_yaml_module_with_parsers(); - module = get_access_to_python_module("pychrysalide.plugins.yaml"); - - if (result) result = register_python_yaml_node(module); - if (result) result = register_python_yaml_collection(module); - if (result) result = register_python_yaml_line(module); - if (result) result = register_python_yaml_pair(module); - if (result) result = register_python_yaml_reader(module); - if (result) result = register_python_yaml_scalar(module); - if (result) result = register_python_yaml_tree(module); + if (result) result = ensure_python_yaml_node_is_registered(); + if (result) result = ensure_python_yaml_collection_is_registered(); + if (result) result = ensure_python_yaml_pair_is_registered(); assert(result); |