diff options
Diffstat (limited to 'plugins/pychrysalide/arch/constants.c')
-rw-r--r-- | plugins/pychrysalide/arch/constants.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/plugins/pychrysalide/arch/constants.c b/plugins/pychrysalide/arch/constants.c index b7dd8a1..f738ec3 100644 --- a/plugins/pychrysalide/arch/constants.c +++ b/plugins/pychrysalide/arch/constants.c @@ -150,3 +150,45 @@ bool define_arch_vmpa_constants(PyTypeObject *type) return result; } + + +/****************************************************************************** +* * +* Paramètres : type = type dont le dictionnaire est à compléter. * +* * +* Description : Définit les constantes relatives aux contextes. * +* * +* Retour : true en cas de succès de l'opération, false sinon. * +* * +* Remarques : - * +* * +******************************************************************************/ + +bool define_proc_context_constants(PyTypeObject *type) +{ + bool result; /* Bilan à retourner */ + PyObject *values; /* Groupe de valeurs à établir */ + + values = PyDict_New(); + + result = add_const_to_group(values, "ENTRY_POINT", DPL_ENTRY_POINT); + if (result) result = add_const_to_group(values, "FORMAT_POINT", DPL_FORMAT_POINT); + if (result) result = add_const_to_group(values, "SYMBOL", DPL_SYMBOL); + if (result) result = add_const_to_group(values, "OTHER", DPL_OTHER); + if (result) result = add_const_to_group(values, "COUNT", DPL_COUNT); + + if (!result) + { + Py_DECREF(values); + goto exit; + } + + result = attach_constants_group_to_type(type, true, "DisassPriorityLevel", values, + "Level of priority for a given point during the" \ + " disassembling process."); + + exit: + + return result; + +} |