summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/arch
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pychrysalide/arch')
-rw-r--r--plugins/pychrysalide/arch/immediate.c18
-rw-r--r--plugins/pychrysalide/arch/instruction.c2
-rw-r--r--plugins/pychrysalide/arch/module.c4
3 files changed, 3 insertions, 21 deletions
diff --git a/plugins/pychrysalide/arch/immediate.c b/plugins/pychrysalide/arch/immediate.c
index 794571d..e3c5c34 100644
--- a/plugins/pychrysalide/arch/immediate.c
+++ b/plugins/pychrysalide/arch/immediate.c
@@ -498,26 +498,12 @@ static PyObject *py_imm_operand_to_string(PyObject *self, PyObject *args)
{
PyObject *result; /* Instance à retourner */
GImmOperand *operand; /* Version GLib de l'opérande */
- unsigned int raw_syntax; /* Affichage brut à utiliser */
- int ret; /* Bilan de lecture des args. */
- AsmSyntax syntax; /* Affichage final à utiliser */
char value[IMM_MAX_SIZE]; /* Valeur humainement lisible */
operand = G_IMM_OPERAND(pygobject_get(self));
assert(operand != NULL);
- ret = PyArg_ParseTuple(args, "I", &raw_syntax);
- if (!ret) return NULL;
-
- syntax = raw_syntax;
-
- if (syntax != ASX_INTEL && syntax != ASX_ATT)
- {
- PyErr_SetString(PyExc_ValueError, _("Invalid syntax type"));
- return NULL;
- }
-
- g_imm_operand_to_string(operand, syntax, value);
+ g_imm_operand_to_string(operand, value);
result = PyUnicode_FromString(value);
@@ -620,7 +606,7 @@ PyTypeObject *get_python_imm_operand_type(void)
static PyMethodDef py_imm_operand_methods[] = {
{
"to_string", py_imm_operand_to_string,
- METH_VARARGS,
+ METH_NOARGS,
"to_string($self, syntax, /)\n--\n\nConvert the immediate operand to a string."
},
{ NULL }
diff --git a/plugins/pychrysalide/arch/instruction.c b/plugins/pychrysalide/arch/instruction.c
index 7d5462d..e9a2e04 100644
--- a/plugins/pychrysalide/arch/instruction.c
+++ b/plugins/pychrysalide/arch/instruction.c
@@ -322,7 +322,7 @@ static PyObject *py_arch_instruction_get_keyword(PyObject *self, void *unused)
const char *kw; /* Valeur récupérée */
instr = G_ARCH_INSTRUCTION(pygobject_get(self));
- kw = g_arch_instruction_get_keyword(instr, 0/* FIXME*/);
+ kw = g_arch_instruction_get_keyword(instr);
result = PyUnicode_FromString(kw);
diff --git a/plugins/pychrysalide/arch/module.c b/plugins/pychrysalide/arch/module.c
index 9c10965..406b78c 100644
--- a/plugins/pychrysalide/arch/module.c
+++ b/plugins/pychrysalide/arch/module.c
@@ -87,10 +87,6 @@ static bool py_base_define_constants(PyTypeObject *obj_type)
result &= PyDict_AddIntMacro(obj_type, MDS_32_BITS);
result &= PyDict_AddIntMacro(obj_type, MDS_64_BITS);
- result &= PyDict_AddIntMacro(obj_type, ASX_INTEL);
- result &= PyDict_AddIntMacro(obj_type, ASX_ATT);
- result &= PyDict_AddIntMacro(obj_type, ASX_COUNT);
-
return result;
}