summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/glibext
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-07-27 22:43:38 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-07-27 22:49:24 (GMT)
commitd9c8eaac961b6fa097b362b2202c176a5ef16ec2 (patch)
treeba4572719bd7b2f84d7e06e59fbacfcfddc4ddde /plugins/pychrysalide/glibext
parent703e0d10d56bb288b515526f0d0f1994391619bf (diff)
Replaced all BLC_* constants by the new DLC_* values.
Diffstat (limited to 'plugins/pychrysalide/glibext')
-rw-r--r--plugins/pychrysalide/glibext/bufferline.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/plugins/pychrysalide/glibext/bufferline.c b/plugins/pychrysalide/glibext/bufferline.c
index d30d11d..e3fd8d4 100644
--- a/plugins/pychrysalide/glibext/bufferline.c
+++ b/plugins/pychrysalide/glibext/bufferline.c
@@ -60,9 +60,6 @@ static PyObject *py_buffer_line_remove_flag(PyObject *, PyObject *);
/* Renseigne sur les propriétés particulières liées à une ligne. */
static PyObject *py_buffer_line_get_flags(PyObject *, void *);
-/* Définit les constantes pour les lignes de tampon. */
-static bool py_buffer_line_define_constants(PyTypeObject *);
-
/******************************************************************************
@@ -216,12 +213,6 @@ static PyObject *py_buffer_line_get_text(PyObject *self, PyObject *args)
ret = PyArg_ParseTuple(args, "IIp", &first, &end, &markup);
if (!ret) return NULL;
- if (first >= BLC_COUNT || end >= BLC_COUNT)
- {
- PyErr_SetString(PyExc_ValueError, _("Invalid range in arguments"));
- return NULL;
- }
-
line = G_BUFFER_LINE(pygobject_get(self));
text = g_buffer_line_get_text(line, first, end, markup);
@@ -345,37 +336,6 @@ static PyObject *py_buffer_line_get_flags(PyObject *self, void *closure)
/******************************************************************************
* *
-* Paramètres : obj_type = type dont le dictionnaire est à compléter. *
-* *
-* Description : Définit les constantes pour les lignes de tampon. *
-* *
-* Retour : true en cas de succès de l'opération, false sinon. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static bool py_buffer_line_define_constants(PyTypeObject *obj_type)
-{
- bool result; /* Bilan à retourner */
-
- result = true;
-
- result &= PyDict_AddULongMacro(obj_type, BLC_PHYSICAL);
- result &= PyDict_AddULongMacro(obj_type, BLC_VIRTUAL);
- result &= PyDict_AddULongMacro(obj_type, BLC_BINARY);
- result &= PyDict_AddULongMacro(obj_type, BLC_ASSEMBLY_HEAD);
- result &= PyDict_AddULongMacro(obj_type, BLC_ASSEMBLY);
- result &= PyDict_AddULongMacro(obj_type, BLC_COMMENTS);
- result &= PyDict_AddULongMacro(obj_type, BLC_COUNT);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
* Paramètres : - *
* *
* Description : Fournit un accès à une définition de type à diffuser. *
@@ -474,9 +434,6 @@ bool ensure_python_buffer_line_is_registered(void)
if (!define_buffer_line_constants(type))
return false;
- if (!py_buffer_line_define_constants(type))
- return false;
-
}
return true;