diff options
Diffstat (limited to 'src/analysis/type.c')
-rw-r--r-- | src/analysis/type.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/analysis/type.c b/src/analysis/type.c index 37ad5a1..23ecc2a 100644 --- a/src/analysis/type.c +++ b/src/analysis/type.c @@ -174,20 +174,22 @@ void g_data_type_set_namespace(GDataType *type, GDataType *namespace) char *_g_data_type_to_string(const GDataType *type, bool simple) { char *result; /* Chaîne à retourner */ + const GDataType *parent; /* Espace supérieur */ char *namespace; /* Groupe d'appartenance */ result = type->to_string(type); - if (!simple && type->namespace != NULL) - { - namespace = g_data_type_to_string(type->namespace); + if (!simple) + for (parent = type->namespace; parent != NULL; parent = parent->namespace) + { + namespace = g_data_type_to_string(parent); - result = strprep(result, "." /* FIXME */); - result = strprep(result, namespace); + result = strprep(result, "." /* FIXME */); + result = strprep(result, namespace); - free(namespace); + free(namespace); - } + } if (type->qualifiers & TQF_RESTRICT) result = strprep(result, "restrict "); |