diff options
Diffstat (limited to 'src/analysis/routine.c')
-rw-r--r-- | src/analysis/routine.c | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/src/analysis/routine.c b/src/analysis/routine.c index c5bf056..8db366d 100644 --- a/src/analysis/routine.c +++ b/src/analysis/routine.c @@ -340,6 +340,25 @@ void g_binary_routine_set_namespace(GBinRoutine *routine, GOpenidaType *namespac /****************************************************************************** * * +* Paramètres : routine = routine à mettre à jour. * +* * +* Description : Fournit le groupe d'appartenance d'une routine donnée. * +* * +* Retour : éventuelle instance d'appartenance ou NULL. * +* * +* Remarques : - * +* * +******************************************************************************/ + +GOpenidaType *g_binary_routine_get_namespace(const GBinRoutine *routine) +{ + return routine->namespace; + +} + + +/****************************************************************************** +* * * Paramètres : routine = routine à mettre à jour. * * name = désignation humainement lisible. * * * @@ -444,7 +463,9 @@ void g_binary_routine_set_return_type(GBinRoutine *routine, GOpenidaType *type) g_object_unref(G_OBJECT(routine->ret_type)); routine->ret_type = type; - g_object_ref(G_OBJECT(type)); + + if (type != NULL) + g_object_ref(G_OBJECT(type)); } @@ -593,7 +614,7 @@ size_t g_binary_routine_get_var_index_from_offset(const GBinRoutine *routine, si * * ******************************************************************************/ -char *g_binary_routine_to_string(const GBinRoutine *routine) +char *_g_binary_routine_to_string(const GBinRoutine *routine, Routine2StringOptions options) { char *result; /* Chaîne à renvoyer */ char *namespace; /* Groupe d'appartenance */ @@ -629,7 +650,7 @@ char *g_binary_routine_to_string(const GBinRoutine *routine) /* Nom de la routine */ - if (routine->namespace != NULL) + if (options & RSO_NAMESPACE && routine->namespace != NULL) { namespace = g_openida_type_to_string(routine->namespace); @@ -650,7 +671,7 @@ char *g_binary_routine_to_string(const GBinRoutine *routine) { if (i > 0) result = stradd(result, ", "); - typestr = g_binary_variable_to_string(routine->args[i]); + typestr = g_binary_variable_to_string(routine->args[i], !(options & RSO_LONG_TYPE)); result = stradd(result, typestr); free(typestr); |