summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/arch/immediate.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-07-19 20:00:40 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-07-19 20:00:40 (GMT)
commit12abead3f60d6f72c0d41672af87215dfc13c8fc (patch)
tree3fda90b6e1b439644a39730ae8935c74da1f2d44 /plugins/pychrysalide/arch/immediate.c
parent79ae70be75b534c18fbfce38294f5ba7feef0e11 (diff)
Deleted all references to any asm syntax.
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 }