diff options
Diffstat (limited to 'src/arch/jvm')
-rw-r--r-- | src/arch/jvm/processor.c | 55 |
1 files changed, 54 insertions, 1 deletions
diff --git a/src/arch/jvm/processor.c b/src/arch/jvm/processor.c index 10efc5b..5872fd9 100644 --- a/src/arch/jvm/processor.c +++ b/src/arch/jvm/processor.c @@ -52,6 +52,12 @@ static void g_jvm_processor_class_init(GJvmProcessorClass *); /* Initialise une instance de processeur de JVM. */ static void g_jvm_processor_init(GJvmProcessor *); +/* Supprime toutes les références externes. */ +static void g_jvm_processor_dispose(GJvmProcessor *); + +/* Procède à la libération totale de la mémoire. */ +static void g_jvm_processor_finalize(GJvmProcessor *); + /* Décode une instruction dans un flux de données. */ static GArchInstruction *g_jvm_processor_decode_instruction(const GJvmProcessor *, const bin_t *, off_t *, off_t, vmpa_t); @@ -75,6 +81,17 @@ G_DEFINE_TYPE(GJvmProcessor, g_jvm_processor, G_TYPE_ARCH_PROCESSOR); static void g_jvm_processor_class_init(GJvmProcessorClass *klass) { + GObjectClass *object; /* Autre version de la classe */ + GArchProcessorClass *proc; /* Encore une autre vision... */ + + object = G_OBJECT_CLASS(klass); + + object->dispose = (GObjectFinalizeFunc/* ! */)g_jvm_processor_dispose; + object->finalize = (GObjectFinalizeFunc)g_jvm_processor_finalize; + + proc = G_ARCH_PROCESSOR_CLASS(klass); + + proc->decode = (decode_instruction_fc)g_jvm_processor_decode_instruction; } @@ -100,7 +117,43 @@ static void g_jvm_processor_init(GJvmProcessor *proc) parent->endianness = SRE_BIG; parent->memsize = MDS_32_BITS; - parent->decode = (decode_instruction_fc)g_jvm_processor_decode_instruction; +} + + +/****************************************************************************** +* * +* Paramètres : proc = instance d'objet GLib à traiter. * +* * +* Description : Supprime toutes les références externes. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static void g_jvm_processor_dispose(GJvmProcessor *proc) +{ + G_OBJECT_CLASS(g_jvm_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_jvm_processor_finalize(GJvmProcessor *proc) +{ + G_OBJECT_CLASS(g_jvm_processor_parent_class)->finalize(G_OBJECT(proc)); } |