diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-01-04 13:54:17 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-01-04 13:54:17 (GMT) |
commit | 4b54747c0ee3736591b3fb38b156837b0958b1cc (patch) | |
tree | 618a8454446f4f8f25aa5f7817c72bbcc706ae4d /plugins/yaml/python/scalar.c | |
parent | aded4e75efc21319d5a777bf53bc087587f0740c (diff) |
Stuck to the Yaml specifications a little bit more.
Diffstat (limited to 'plugins/yaml/python/scalar.c')
-rw-r--r-- | plugins/yaml/python/scalar.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/plugins/yaml/python/scalar.c b/plugins/yaml/python/scalar.c index ee38edf..bd14f50 100644 --- a/plugins/yaml/python/scalar.c +++ b/plugins/yaml/python/scalar.c @@ -41,9 +41,6 @@ /* Crée un nouvel objet Python de type 'YamlScalar'. */ static PyObject *py_yaml_scalar_new(PyTypeObject *, PyObject *, PyObject *); -/* Fournit la ligne principale associée à un noeud. */ -static PyObject *py_yaml_scalar_get_yaml_line(PyObject *, void *); - /* Attache une collection de noeuds Yaml à un noeud. */ static int py_yaml_scalar_set_collection(PyObject *, PyObject *, void *); @@ -98,51 +95,6 @@ static PyObject *py_yaml_scalar_new(PyTypeObject *type, PyObject *args, PyObject /****************************************************************************** * * -* Paramètres : self = objet Python concerné par l'appel. * -* closure = non utilisé ici. * -* * -* Description : Fournit la ligne principale associée à un noeud. * -* * -* Retour : Ligne Yaml à l'origine du noeud. * -* * -* Remarques : - * -* * -******************************************************************************/ - -static PyObject *py_yaml_scalar_get_yaml_line(PyObject *self, void *closure) -{ - PyObject *result; /* Résultat à retourner */ - GYamlScalar *node; /* Version GLib du noeud */ - GYamlLine *line; /* Line Yaml associée */ - -#define YAML_SCALAR_YAML_LINE_ATTRIB PYTHON_GET_DEF_FULL \ -( \ - yaml_line, py_yaml_scalar, \ - "Orginal Yaml line linked to the scalar." \ -) - - node = G_YAML_SCALAR(pygobject_get(self)); - - line = g_yaml_scalar_get_yaml_line(node); - - if (line == NULL) - { - result = Py_None; - Py_INCREF(result); - } - else - { - result = pygobject_new(G_OBJECT(line)); - g_object_unref(G_OBJECT(line)); - } - - return result; - -} - - -/****************************************************************************** -* * * Paramètres : self = contenu binaire à manipuler. * * value = collection de noeuds Yaml. * * closure = adresse non utilisée ici. * @@ -252,7 +204,6 @@ PyTypeObject *get_python_yaml_scalar_type(void) }; static PyGetSetDef py_yaml_scalar_getseters[] = { - YAML_SCALAR_YAML_LINE_ATTRIB, YAML_SCALAR_COLLECTION_ATTRIB, { NULL } }; |