summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/arch/instructions/constants.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pychrysalide/arch/instructions/constants.c')
-rw-r--r--plugins/pychrysalide/arch/instructions/constants.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/plugins/pychrysalide/arch/instructions/constants.c b/plugins/pychrysalide/arch/instructions/constants.c
index 1f6a1d2..b5e08e1 100644
--- a/plugins/pychrysalide/arch/instructions/constants.c
+++ b/plugins/pychrysalide/arch/instructions/constants.c
@@ -25,6 +25,7 @@
#include "constants.h"
+#include <arch/instructions/raw.h>
#include <arch/instructions/undefined.h>
@@ -36,6 +37,47 @@
* *
* Paramètres : type = type dont le dictionnaire est à compléter. *
* *
+* Description : Définit les constantes relatives aux instructions brutes. *
+* *
+* Retour : true en cas de succès de l'opération, false sinon. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+bool define_raw_instruction_constants(PyTypeObject *type)
+{
+ bool result; /* Bilan à retourner */
+ PyObject *values; /* Groupe de valeurs à établir */
+
+ values = PyDict_New();
+
+ result = add_const_to_group(values, "PADDING", RIF_PADDING);
+ if (result) result = add_const_to_group(values, "STRING", RIF_STRING);
+
+ if (!result)
+ {
+ Py_DECREF(values);
+ goto exit;
+ }
+
+ result = attach_constants_group_to_type(type, true, "RawInstrFlag", values,
+ "Flags for some instruction properties.\n"
+ "\n"
+ "They can be seen as an extension of" \
+ " pychrysalide.arch.ArchInstruction.ArchInstrFlag");
+
+ exit:
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : type = type dont le dictionnaire est à compléter. *
+* *
* Description : Définit les constantes liées aux comportements erratiques. *
* *
* Retour : true en cas de succès de l'opération, false sinon. *