summaryrefslogtreecommitdiff
path: root/src/analysis/routine.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/routine.c')
-rw-r--r--src/analysis/routine.c33
1 files changed, 25 insertions, 8 deletions
diff --git a/src/analysis/routine.c b/src/analysis/routine.c
index 8c38ff1..240004f 100644
--- a/src/analysis/routine.c
+++ b/src/analysis/routine.c
@@ -826,12 +826,11 @@ char *g_binary_routine_to_string(const GBinRoutine *routine, bool include)
{
case RTT_CONSTRUCTOR:
result = g_binary_routine_get_label(routine);
- result = stradd(result, "." /* FIXME */);
+ result = stradd(result, " *");
break;
case RTT_DESTRUCTOR:
- result = g_binary_routine_get_label(routine);
- result = stradd(result, "::~");
+ result = strdup("void ");
break;
default: /* Pour gcc */
@@ -863,17 +862,35 @@ char *g_binary_routine_to_string(const GBinRoutine *routine, bool include)
}
if (routine->full_name != NULL)
- {
name = g_data_type_to_string(routine->full_name, true);
- result = stradd(result, name);
+ else if (routine->name != NULL)
+ name = routine->name;
- free(name);
+ switch (routine->type)
+ {
+ case RTT_CONSTRUCTOR:
+ result = stradd(result, name);
+ result = stradd(result, routine->ns_sep);
+ result = stradd(result, name);
+ break;
+
+ case RTT_DESTRUCTOR:
+ result = stradd(result, name);
+ result = stradd(result, routine->ns_sep);
+ result = stradd(result, "~");
+ result = stradd(result, name);
+ break;
+
+ default: /* Pour gcc */
+ case RTT_CLASSIC:
+ result = stradd(result, name);
+ break;
}
- else if (routine->name != NULL)
- result = stradd(result, routine->name);
+ if (routine->full_name != NULL)
+ free(name);
/* Liste des arguments */