summaryrefslogtreecommitdiff
path: root/src/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/mips')
-rw-r--r--src/arch/mips/processor.c55
1 files changed, 54 insertions, 1 deletions
diff --git a/src/arch/mips/processor.c b/src/arch/mips/processor.c
index aa288b1..15de6cc 100644
--- a/src/arch/mips/processor.c
+++ b/src/arch/mips/processor.c
@@ -51,6 +51,12 @@ static void g_mips_processor_class_init(GMipsProcessorClass *);
/* Initialise la classe des lignes de descriptions initiales. */
static void g_mips_processor_init(GMipsProcessor *);
+/* Supprime toutes les références externes. */
+static void g_mips_processor_dispose(GMipsProcessor *);
+
+/* Procède à la libération totale de la mémoire. */
+static void g_mips_processor_finalize(GMipsProcessor *);
+
/* Décode une instruction dans un flux de données. */
static GArchInstruction *g_mips_processor_decode_instruction(const GMipsProcessor *, const bin_t *, off_t *, off_t, vmpa_t);
@@ -74,6 +80,17 @@ G_DEFINE_TYPE(GMipsProcessor, g_mips_processor, G_TYPE_ARCH_PROCESSOR);
static void g_mips_processor_class_init(GMipsProcessorClass *klass)
{
+ GObjectClass *object; /* Autre version de la classe */
+ GArchProcessorClass *proc; /* Encore une autre vision... */
+
+ object = G_OBJECT_CLASS(klass);
+
+ object->dispose = (GObjectFinalizeFunc/* ! */)g_mips_processor_dispose;
+ object->finalize = (GObjectFinalizeFunc)g_mips_processor_finalize;
+
+ proc = G_ARCH_PROCESSOR_CLASS(klass);
+
+ proc->decode = (decode_instruction_fc)g_mips_processor_decode_instruction;
}
@@ -99,7 +116,43 @@ static void g_mips_processor_init(GMipsProcessor *proc)
parent->endianness = SRE_BIG;
parent->memsize = MDS_32_BITS;
- parent->decode = (decode_instruction_fc)g_mips_processor_decode_instruction;
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : proc = instance d'objet GLib à traiter. *
+* *
+* Description : Supprime toutes les références externes. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static void g_mips_processor_dispose(GMipsProcessor *proc)
+{
+ G_OBJECT_CLASS(g_mips_processor_parent_class)->dispose(G_OBJECT(proc));
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : bookmark = instance d'objet GLib à traiter. *
+* *
+* Description : Procède à la libération totale de la mémoire. *
+* *
+* Retour : - *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static void g_mips_processor_finalize(GMipsProcessor *proc)
+{
+ G_OBJECT_CLASS(g_mips_processor_parent_class)->finalize(G_OBJECT(proc));
}