summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/arch/operand.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2021-08-14 19:54:31 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2021-08-14 19:54:31 (GMT)
commita6c0351774988094a51c9502f2a8e07633956263 (patch)
treedcaad9d00b6ce130d9af012286899ab877cc82cb /plugins/pychrysalide/arch/operand.c
parent0daed1fa6212eb83b65ccd10c9f2c80bf12c6d27 (diff)
Improve the object padding exploitation for operands.
Diffstat (limited to 'plugins/pychrysalide/arch/operand.c')
-rw-r--r--plugins/pychrysalide/arch/operand.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/pychrysalide/arch/operand.c b/plugins/pychrysalide/arch/operand.c
index f3eaa27..71e7cdc 100644
--- a/plugins/pychrysalide/arch/operand.c
+++ b/plugins/pychrysalide/arch/operand.c
@@ -49,7 +49,7 @@ static PyObject *py_arch_operand_new(PyTypeObject *, PyObject *, PyObject *);
static void py_arch_operand_init_gclass(GArchOperandClass *, gpointer);
/* Compare un opérande avec un autre. */
-static int py_arch_operand___cmp___wrapper(const GArchOperand *, const GArchOperand *);
+static int py_arch_operand___cmp___wrapper(const GArchOperand *, const GArchOperand *, bool);
/* Détermine le chemin conduisant à un opérande interne. */
static char *py_arch_operand_find_inner_operand_path_wrapper(const GArchOperand *, const GArchOperand *);
@@ -193,8 +193,9 @@ static void py_arch_operand_init_gclass(GArchOperandClass *class, gpointer unuse
/******************************************************************************
* *
-* Paramètres : a = premier opérande à consulter. *
-* b = second opérande à consulter. *
+* Paramètres : a = premier opérande à consulter. *
+* b = second opérande à consulter. *
+* lock = précise le besoin en verrouillage. *
* *
* Description : Compare un opérande avec un autre. *
* *
@@ -204,7 +205,7 @@ static void py_arch_operand_init_gclass(GArchOperandClass *class, gpointer unuse
* *
******************************************************************************/
-static int py_arch_operand___cmp___wrapper(const GArchOperand *a, const GArchOperand *b)
+static int py_arch_operand___cmp___wrapper(const GArchOperand *a, const GArchOperand *b, bool lock)
{
int result; /* Empreinte à retourner */
PyGILState_STATE gstate; /* Sauvegarde d'environnement */
@@ -559,7 +560,7 @@ static PyObject *py_arch_operand_richcompare(PyObject *a, PyObject *b, int op)
reg_a = G_ARCH_OPERAND(pygobject_get(a));
reg_b = G_ARCH_OPERAND(pygobject_get(b));
- status = py_arch_operand___cmp___wrapper(reg_a, reg_b);
+ status = py_arch_operand___cmp___wrapper(reg_a, reg_b, true);
result = status_to_rich_cmp_state(status, op);