diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-07-24 18:43:55 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-07-24 18:43:55 (GMT) |
commit | 156d2e2f6beda2302552ac79678494d914fda05b (patch) | |
tree | 021825960b7ac3315a336fc085a4f1d07c05df39 /src/format/format.c | |
parent | 21537636cd8318cf5a720211619ad3c3023b52e9 (diff) |
Replaced all remaining raw accesses to binary contents with the GBinContent wrapper in binary formats.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@555 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/format.c')
-rw-r--r-- | src/format/format.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/src/format/format.c b/src/format/format.c index 3373af3..74549bc 100644 --- a/src/format/format.c +++ b/src/format/format.c @@ -119,10 +119,7 @@ static void g_binary_format_init(GBinFormat *format) void g_binary_format_set_content(GBinFormat *format, GBinContent *content) { - - format->conten_ = content; - - format->content = g_binary_content_get(content, &format->length); + format->content = content; } @@ -130,39 +127,24 @@ void g_binary_format_set_content(GBinFormat *format, GBinContent *content) /****************************************************************************** * * * Paramètres : format = description de l'exécutable à consulter. * -* length = taille du contenu à fournir. [OUT] * * * * Description : Fournit une référence vers le contenu binaire analysé. * * * -* Retour : Adresse du tampon contenant le contenu du binaire. * +* Retour : Gestionnaire de contenu binaire en place. * * * * Remarques : - * * * ******************************************************************************/ -const bin_t *g_binary_format_get_content(const GBinFormat *format, off_t *length) +GBinContent *g_binary_format_get_content(const GBinFormat *format) { - if (length != NULL) *length = format->length; + g_object_ref(G_OBJECT(format->content)); return format->content; } - - -GBinContent *g_binary_format_get_conten_(const GBinFormat *format) -{ - g_object_ref(G_OBJECT(format->conten_)); - - - return format->conten_; - -} - - - - /****************************************************************************** * * * Paramètres : format = description de l'exécutable à consulter. * |