summaryrefslogtreecommitdiff
path: root/plugins/pychrysa/arch/immediate.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-04-20 18:52:01 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-04-20 18:52:01 (GMT)
commit8e5c8417e8ef79c1b475cb1b86a1754b24f9af78 (patch)
tree650a39bde7a5367995b471a562aa766febd505bc /plugins/pychrysa/arch/immediate.c
parentc177597d6da5dedb32aa176e8370db8ffb7f87aa (diff)
Shared immediate operands in order to avoid useless allocations.
Diffstat (limited to 'plugins/pychrysa/arch/immediate.c')
-rw-r--r--plugins/pychrysa/arch/immediate.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/plugins/pychrysa/arch/immediate.c b/plugins/pychrysa/arch/immediate.c
index e600a9a..363c3cc 100644
--- a/plugins/pychrysa/arch/immediate.c
+++ b/plugins/pychrysa/arch/immediate.c
@@ -243,7 +243,9 @@ static int py_imm_operand_set_padding(PyObject *self, PyObject *value, void *clo
operand = G_IMM_OPERAND(pygobject_get(self));
assert(operand != NULL);
- g_imm_operand_pad(operand, padding);
+ g_imm_operand_pad(&operand, padding, NULL);
+
+ pygobject_set(self, operand);
return 0;
@@ -316,7 +318,9 @@ static int py_imm_operand_set_default_display(PyObject *self, PyObject *value, v
operand = G_IMM_OPERAND(pygobject_get(self));
assert(operand != NULL);
- g_imm_operand_set_default_display(operand, display);
+ g_imm_operand_set_default_display(&operand, display, NULL);
+
+ pygobject_set(self, operand);
return 0;
@@ -390,7 +394,9 @@ static int py_imm_operand_set_display(PyObject *self, PyObject *value, void *clo
operand = G_IMM_OPERAND(pygobject_get(self));
assert(operand != NULL);
- g_imm_operand_set_display(operand, display);
+ g_imm_operand_set_display(&operand, display, NULL);
+
+ pygobject_set(self, operand);
return 0;