summaryrefslogtreecommitdiff
path: root/plugins/yaml/python/collection.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2023-04-27 21:27:52 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2023-04-27 21:27:52 (GMT)
commit25bac01127581767639a5bd9024c41eb803388fa (patch)
treea67cd5cdecbf001e788935e756fc722b7c552b9b /plugins/yaml/python/collection.c
parenta1ff7646ce6f829dd192e2e2246def2ea583e93b (diff)
Replace the old YAML parser by another one relying on the external libyaml library.
Diffstat (limited to 'plugins/yaml/python/collection.c')
-rw-r--r--plugins/yaml/python/collection.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/plugins/yaml/python/collection.c b/plugins/yaml/python/collection.c
index e21bb9e..f8e29b3 100644
--- a/plugins/yaml/python/collection.c
+++ b/plugins/yaml/python/collection.c
@@ -39,7 +39,7 @@
/* Crée un nouvel objet Python de type 'YamlCollection'. */
static PyObject *py_yaml_collection_new(PyTypeObject *, PyObject *, PyObject *);
-/* Indique la nature d'une collection Yaml. */
+/* Indique la nature d'une collection YAML. */
static PyObject *py_yaml_collection_is_sequence(PyObject *, void *);
/* Fournit la liste des noeuds intégrés dans une collection. */
@@ -69,13 +69,14 @@ static PyObject *py_yaml_collection_new(PyTypeObject *type, PyObject *args, PyOb
GYamlCollection *collec; /* Création GLib à transmettre */
#define YAML_COLLECTION_DOC \
- "YamlCollection handles a collection of Yaml nodes.\n" \
+ "YamlCollection handles a collection of YAML nodes.\n" \
"\n" \
"Instances can be created using the following constructor:\n" \
"\n" \
" YamlCollection(seq=False)\n" \
"\n" \
- "Where seq defines if the collection will be a sequence or a mapping of nodes."
+ "Where *seq* is a boolean value which defines if the collection will be a" \
+ " sequence or a mapping of nodes."
ret = PyArg_ParseTuple(args, "p", &seq);
if (!ret) return NULL;
@@ -98,7 +99,7 @@ static PyObject *py_yaml_collection_new(PyTypeObject *type, PyObject *args, PyOb
* *
* Description : Fournit la liste des noeuds intégrés dans une collection. *
* *
-* Retour : Enfants d'un noeud issu d'une collection Yaml. *
+* Retour : Enfants d'un noeud issu d'une collection YAML. *
* *
* Remarques : - *
* *
@@ -152,7 +153,7 @@ static PyObject *py_yaml_collection_get_nodes(PyObject *self, void *closure)
* Paramètres : self = objet Python concerné par l'appel. *
* closure = non utilisé ici. *
* *
-* Description : Indique la nature d'une collection Yaml. *
+* Description : Indique la nature d'une collection YAML. *
* *
* Retour : Nature de la collection. *
* *
@@ -169,7 +170,7 @@ static PyObject *py_yaml_collection_is_sequence(PyObject *self, void *closure)
#define YAML_COLLECTION_IS_SEQUENCE_ATTRIB PYTHON_IS_DEF_FULL \
( \
sequence, py_yaml_collection, \
- "Nature of the collection: True is the collection is a sequence," \
+ "Nature of the collection: True if the collection is a sequence," \
" False if it is a mapping of \"key: value\" nodes." \
)
@@ -265,7 +266,7 @@ bool register_python_yaml_collection(PyObject *module)
* Paramètres : arg = argument quelconque à tenter de convertir. *
* dst = destination des valeurs récupérées en cas de succès. *
* *
-* Description : Tente de convertir en collection de noeuds de format Yaml. *
+* Description : Tente de convertir en collection de noeuds de format YAML. *
* *
* Retour : Bilan de l'opération, voire indications supplémentaires. *
* *
@@ -287,7 +288,7 @@ int convert_to_yaml_collection(PyObject *arg, void *dst)
break;
case 0:
- PyErr_SetString(PyExc_TypeError, "unable to convert the provided argument to Yaml collection");
+ PyErr_SetString(PyExc_TypeError, "unable to convert the provided argument to YAML collection");
break;
case 1: