summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/arch/immediate.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pychrysalide/arch/immediate.c')
-rw-r--r--plugins/pychrysalide/arch/immediate.c18
1 files changed, 2 insertions, 16 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 }