From 338aa7d10b192996afbcb512d7464cf91724156b Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Fri, 15 May 2015 15:16:48 +0100 Subject: [PATCH] eolian: use the new decl storage to retrieve REGULAR base types --- src/lib/eolian/database_type_api.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/lib/eolian/database_type_api.c b/src/lib/eolian/database_type_api.c index 81a769c916..0799fce17d 100644 --- a/src/lib/eolian/database_type_api.c +++ b/src/lib/eolian/database_type_api.c @@ -240,13 +240,10 @@ eolian_type_base_type_get(const Eolian_Type *tp) int kw = eo_lexer_keyword_str_to_id(tp->full_name); if (!kw || kw < KW_byte || kw > KW_list) { - Eolian_Type *rtp; - rtp = eina_hash_find(_aliases, tp->full_name); - if (rtp) return rtp; - rtp = eina_hash_find(_structs, tp->full_name); - if (rtp) return rtp; - rtp = eina_hash_find(_enums, tp->full_name); - if (rtp) return rtp; + Eolian_Declaration *decl = eina_hash_find(_decls, tp->full_name); + if (decl && decl->type != EOLIAN_DECL_CLASS + && decl->type != EOLIAN_DECL_VAR) + return decl->data; } return NULL; }