summaryrefslogtreecommitdiff
path: root/src/analysis/loaded.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-07-12 13:52:22 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-07-12 13:52:22 (GMT)
commit2bd3ea7249d1234204c1b70abac8bc46e221fb95 (patch)
treef6b0f71d430bda2e8d762afbf5d084ac58cee640 /src/analysis/loaded.c
parent6ea1b9a8550adf84cde510c2d4446c5120c4d065 (diff)
Improved the API for loaded contents.
Diffstat (limited to 'src/analysis/loaded.c')
-rw-r--r--src/analysis/loaded.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/analysis/loaded.c b/src/analysis/loaded.c
index 79a311f..71b1838 100644
--- a/src/analysis/loaded.c
+++ b/src/analysis/loaded.c
@@ -245,9 +245,9 @@ GBinContent *g_loaded_content_get_content(const GLoadedContent *content)
* *
******************************************************************************/
-const char *g_loaded_content_get_format_name(const GLoadedContent *content)
+char *g_loaded_content_get_format_name(const GLoadedContent *content)
{
- const char *result; /* Contenu interne à renvoyer */
+ char *result; /* Contenu interne à renvoyer */
GLoadedContentIface *iface; /* Interface utilisée */
iface = G_LOADED_CONTENT_GET_IFACE(content);
@@ -365,13 +365,16 @@ bool g_loaded_content_analyze_and_wait(GLoadedContent *content, bool connect, bo
* *
******************************************************************************/
-const char *g_loaded_content_describe(const GLoadedContent *content, bool full)
+char *g_loaded_content_describe(const GLoadedContent *content, bool full)
{
+ char *result; /* Description à retourner */
GLoadedContentIface *iface; /* Interface utilisée */
iface = G_LOADED_CONTENT_GET_IFACE(content);
- return iface->describe(content, full);
+ result = iface->describe(content, full);
+
+ return result;
}
@@ -424,11 +427,14 @@ char **g_loaded_content_detect_obfuscators(const GLoadedContent *content, bool v
unsigned int g_loaded_content_count_views(const GLoadedContent *content)
{
+ unsigned int result; /* Quantité de vues à renvoyer */
GLoadedContentIface *iface; /* Interface utilisée */
iface = G_LOADED_CONTENT_GET_IFACE(content);
- return iface->count_views(content);
+ result = iface->count_views(content);
+
+ return result;
}
@@ -446,9 +452,9 @@ unsigned int g_loaded_content_count_views(const GLoadedContent *content)
* *
******************************************************************************/
-const char *g_loaded_content_get_view_name(const GLoadedContent *content, unsigned int index)
+char *g_loaded_content_get_view_name(const GLoadedContent *content, unsigned int index)
{
- const char *result; /* Désignation à retourner */
+ char *result; /* Désignation à retourner */
GLoadedContentIface *iface; /* Interface utilisée */
iface = G_LOADED_CONTENT_GET_IFACE(content);