summaryrefslogtreecommitdiff
path: root/src/arch/operand.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2012-11-05 19:45:08 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2012-11-05 19:45:08 (GMT)
commitc35d5d4ce62b812ec0aa4a5ebbacb84cd0901d53 (patch)
treeca0262ce4f0a24bdfbc1b9a4ffa1bbb202d47820 /src/arch/operand.c
parentf5df6496fa50927d3d274c939a888afde652b7ad (diff)
Removed the old interface for rendering lines.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@278 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/operand.c')
-rw-r--r--src/arch/operand.c49
1 files changed, 14 insertions, 35 deletions
diff --git a/src/arch/operand.c b/src/arch/operand.c
index 43d0027..e98683e 100644
--- a/src/arch/operand.c
+++ b/src/arch/operand.c
@@ -37,7 +37,7 @@ static void g_arch_operand_init(GArchOperand *);
/* Indique le type défini pour un opérande d'architecture. */
-G_DEFINE_TYPE(GArchOperand, g_arch_operand, G_TYPE_CONTENT_EXPORTER);
+G_DEFINE_TYPE(GArchOperand, g_arch_operand, G_TYPE_OBJECT);
@@ -79,21 +79,27 @@ static void g_arch_operand_init(GArchOperand *operand)
/******************************************************************************
* *
-* Paramètres : operand = opérande à traiter. *
-* format = format du binaire manipulé. *
-* syntax = type de représentation demandée. *
+* Paramètres : a = premier opérande à consulter. *
+* b = second opérande à consulter. *
* *
-* Description : Traduit un opérande en version humainement lisible. *
+* Description : Compare un opérande avec un autre. *
* *
-* Retour : Chaîne de caractères à libérer de la mémoire. *
+* Retour : Bilan de la comparaison. *
* *
* Remarques : - *
* *
******************************************************************************/
-char *g_arch_operand_get_text(const GArchOperand *operand, const GExeFormat *format, AsmSyntax syntax)
+bool g_arch_operand_compare(const GArchOperand *a, const GArchOperand *b)
{
- return operand->get_text(operand, format, syntax);
+ bool result; /* Bilan à faire remonter */
+
+ result = (G_OBJECT_TYPE(G_OBJECT(a)) == G_OBJECT_TYPE(G_OBJECT(b)));
+
+ if (result)
+ result = a->compare(a, b);
+
+ return result;
}
@@ -117,30 +123,3 @@ void g_arch_operand_print(const GArchOperand *operand, GBufferLine *line, AsmSyn
return operand->print(operand, line, syntax);
}
-
-
-/******************************************************************************
-* *
-* Paramètres : a = premier opérande à consulter. *
-* b = second opérande à consulter. *
-* *
-* Description : Compare un opérande avec un autre. *
-* *
-* Retour : Bilan de la comparaison. *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-bool g_arch_operand_compare(const GArchOperand *a, const GArchOperand *b)
-{
- bool result; /* Bilan à faire remonter */
-
- result = (G_OBJECT_TYPE(G_OBJECT(a)) == G_OBJECT_TYPE(G_OBJECT(b)));
-
- if (result)
- result = a->compare(a, b);
-
- return result;
-
-}