summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/arch/operands/constants.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2025-03-17 07:36:58 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2025-03-17 07:36:58 (GMT)
commita28e1b94a83bee9a2424ab84818a5547eafaf0cf (patch)
treeecaf5556433afd4f19f4bfcbf378cdde3f619e51 /plugins/pychrysalide/arch/operands/constants.c
parentb18c64b69c8c048c640b5d9f6c45b1cfda605ae8 (diff)
Restore the definition of main operands.gtk4
Diffstat (limited to 'plugins/pychrysalide/arch/operands/constants.c')
-rw-r--r--plugins/pychrysalide/arch/operands/constants.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/plugins/pychrysalide/arch/operands/constants.c b/plugins/pychrysalide/arch/operands/constants.c
index b9d80e4..78eeded 100644
--- a/plugins/pychrysalide/arch/operands/constants.c
+++ b/plugins/pychrysalide/arch/operands/constants.c
@@ -2,7 +2,7 @@
/* Chrysalide - Outil d'analyse de fichiers binaires
* constants.c - ajout des constantes de base pour les opérandes
*
- * Copyright (C) 2020 Cyrille Bagard
+ * Copyright (C) 2020-2025 Cyrille Bagard
*
* This file is part of Chrysalide.
*
@@ -47,20 +47,33 @@
* *
******************************************************************************/
-bool define_imm_operand_constants(PyTypeObject *type)
+bool define_immediate_operand_constants(PyTypeObject *type)
{
bool result; /* Bilan à retourner */
PyObject *values; /* Groupe de valeurs à établir */
values = PyDict_New();
+ result = add_const_to_group(values, "ZERO_PADDING_BY_DEFAULT", IOF_ZERO_PADDING_BY_DEFAULT);
+ if (result) result = add_const_to_group(values, "ZERO_PADDING", IOF_ZERO_PADDING);
+
+ if (!result)
+ {
+ Py_DECREF(values);
+ goto exit;
+ }
+
+ result = attach_constants_group_to_type(type, true, "ImmOperandFlag", values,
+ "Specific state bits for immediate operands.");
+
+ values = PyDict_New();
+
result = add_const_to_group(values, "BIN", IOD_BIN);
if (result) result = add_const_to_group(values, "OCT", IOD_OCT);
if (result) result = add_const_to_group(values, "DEC", IOD_DEC);
if (result) result = add_const_to_group(values, "HEX", IOD_HEX);
if (result) result = add_const_to_group(values, "CHAR", IOD_CHAR);
if (result) result = add_const_to_group(values, "COUNT", IOD_COUNT);
- if (result) result = add_const_to_group(values, "LAST_VALID", IOD_LAST_VALID);
if (!result)
{