diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-10-01 15:55:39 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-10-01 15:55:39 (GMT) |
commit | d51fef170f00602744e55a8fdb21a3c7d196696a (patch) | |
tree | 5f51c1cdb09669da974c1b99d280a4e7078aab7f /plugins | |
parent | 9aa5b354e83825e2d9843aea742aa62221a2130b (diff) |
Rewritten the whole support of DEX file format.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@581 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mobicore/mclf.c | 58 |
1 files changed, 54 insertions, 4 deletions
diff --git a/plugins/mobicore/mclf.c b/plugins/mobicore/mclf.c index 4ff44bb..7b1249c 100644 --- a/plugins/mobicore/mclf.c +++ b/plugins/mobicore/mclf.c @@ -44,6 +44,12 @@ static void g_mclf_format_class_init(GMCLFFormatClass *); /* Initialise une instance de format d'exécutable MCLF. */ static void g_mclf_format_init(GMCLFFormat *); +/* Supprime toutes les références externes. */ +static void g_mclf_format_dispose(GMCLFFormat *); + +/* Procède à la libération totale de la mémoire. */ +static void g_mclf_format_finalize(GMCLFFormat *); + /* Indique le type d'architecture visée par le format. */ static const char *g_mclf_format_get_target_machine(const GMCLFFormat *); @@ -111,6 +117,18 @@ G_DEFINE_TYPE(GMCLFFormat, g_mclf_format, G_TYPE_EXE_FORMAT); static void g_mclf_format_class_init(GMCLFFormatClass *klass) { + GObjectClass *object; /* Autre version de la classe */ + GExeFormatClass *exe; /* Version en exécutable */ + + object = G_OBJECT_CLASS(klass); + + object->dispose = (GObjectFinalizeFunc/* ! */)g_mclf_format_dispose; + object->finalize = (GObjectFinalizeFunc)g_mclf_format_finalize; + + exe = G_EXE_FORMAT_CLASS(klass); + + exe->get_machine = (get_target_machine_fc)g_mclf_format_get_target_machine; + exe->refine_portions = (refine_portions_fc)g_mclf_format_refine_portions; } @@ -129,12 +147,44 @@ static void g_mclf_format_class_init(GMCLFFormatClass *klass) static void g_mclf_format_init(GMCLFFormat *format) { - GExeFormat *exe_format; /* Format parent à constituer */ - exe_format = G_EXE_FORMAT(format); +} + + +/****************************************************************************** +* * +* Paramètres : format = instance d'objet GLib à traiter. * +* * +* Description : Supprime toutes les références externes. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static void g_mclf_format_dispose(GMCLFFormat *format) +{ + G_OBJECT_CLASS(g_mclf_format_parent_class)->dispose(G_OBJECT(format)); + +} - exe_format->get_machine = (get_target_machine_fc)g_mclf_format_get_target_machine; - exe_format->refine_portions = (refine_portions_fc)g_mclf_format_refine_portions; + +/****************************************************************************** +* * +* Paramètres : format = instance d'objet GLib à traiter. * +* * +* Description : Procède à la libération totale de la mémoire. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +static void g_mclf_format_finalize(GMCLFFormat *format) +{ + G_OBJECT_CLASS(g_mclf_format_parent_class)->finalize(G_OBJECT(format)); } |