diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2016-09-26 18:24:23 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2016-09-26 18:24:23 (GMT) |
commit | 7972f2da7d0e363fe918992cb5661b17ee3577d7 (patch) | |
tree | 6bf42830f32315d01f90c551778b47cc62bba639 /src/analysis/type.c | |
parent | 79f384b20e00977f8450920a8a8983b818d302f8 (diff) |
Defined a proper cache for routine names with their packages.
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 "); |