diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-05-17 08:48:02 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-05-17 08:48:02 (GMT) |
commit | f3e136eab9fd6adcb51988c9f70ca7f35552abc4 (patch) | |
tree | 69c074fec2b72637bd01142add44b130dd13a909 /plugins/pychrysalide/glibext/binportion.c | |
parent | 85bd3c6c415d42c0722298cf8e4542c94a87d7f1 (diff) |
Introduced a new object of string constant sets.
Diffstat (limited to 'plugins/pychrysalide/glibext/binportion.c')
-rw-r--r-- | plugins/pychrysalide/glibext/binportion.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/plugins/pychrysalide/glibext/binportion.c b/plugins/pychrysalide/glibext/binportion.c index 14df461..3065755 100644 --- a/plugins/pychrysalide/glibext/binportion.c +++ b/plugins/pychrysalide/glibext/binportion.c @@ -73,9 +73,6 @@ static PyObject *py_binary_portion_get_rights(PyObject *, void *); /* Définit les droits associés à une partie de code. */ static int py_binary_portion_set_rights(PyObject *, PyObject *, void *); -/* Définit les constantes pour les portions de binaire. */ -static bool py_binary_portion_define_constants(PyTypeObject *); - /****************************************************************************** @@ -608,35 +605,6 @@ static int py_binary_portion_set_rights(PyObject *self, PyObject *value, void *c /****************************************************************************** * * -* Paramètres : obj_type = type dont le dictionnaire est à compléter. * -* * -* Description : Définit les constantes pour les portions de binaire. * -* * -* Retour : true en cas de succès de l'opération, false sinon. * -* * -* Remarques : - * -* * -******************************************************************************/ - -static bool py_binary_portion_define_constants(PyTypeObject *obj_type) -{ - bool result; /* Bilan à retourner */ - - result = true; - - if (result) result = PyDict_AddStringMacro(obj_type, BPC_RAW); - if (result) result = PyDict_AddStringMacro(obj_type, BPC_CODE); - if (result) result = PyDict_AddStringMacro(obj_type, BPC_DATA); - if (result) result = PyDict_AddStringMacro(obj_type, BPC_DATA_RO); - if (result) result = PyDict_AddStringMacro(obj_type, BPC_DISASS_ERROR); - - return result; - -} - - -/****************************************************************************** -* * * Paramètres : - * * * * Description : Fournit un accès à une définition de type à diffuser. * @@ -718,9 +686,6 @@ bool ensure_python_binary_portion_is_registered(void) if (!register_class_for_pygobject(dict, G_TYPE_BIN_PORTION, type, &PyGObject_Type)) return false; - if (!py_binary_portion_define_constants(type)) - return false; - if (!define_binary_portion_constants(type)) return false; |