summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2018-01-12 17:52:44 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2018-01-12 18:05:13 +0100
commit19c16b671e3bafd1ea360fbd331b4952391f6ee9 (patch)
tree57485acaae38331839641dc301ab80ab7a8ccf98
parent707ed05d58b2dd46f7617073ab516a862e2a029a (diff)
eolian: type_typedecl_get doesn't need a unit
-rw-r--r--src/bin/eolian/headers.c2
-rw-r--r--src/bin/eolian/sources.c6
-rw-r--r--src/bindings/luajit/eolian.lua6
-rw-r--r--src/lib/eolian/Eolian.h3
-rw-r--r--src/lib/eolian/database_expr.c2
-rw-r--r--src/lib/eolian/database_expr_api.c2
-rw-r--r--src/lib/eolian/database_type.c22
-rw-r--r--src/lib/eolian/database_type_api.c17
-rw-r--r--src/lib/eolian/database_validate.c2
-rw-r--r--src/lib/eolian/eolian_database.h2
-rw-r--r--src/lib/eolian_cxx/grammar/klass_def.hpp2
-rw-r--r--src/scripts/pyolian/eolian.py9
-rw-r--r--src/scripts/pyolian/eolian_lib.py7
-rw-r--r--src/tests/eolian/eolian_parsing.c10
14 files changed, 50 insertions, 42 deletions
diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c
index b2fe73a00c..8ed0c8e675 100644
--- a/src/bin/eolian/headers.c
+++ b/src/bin/eolian/headers.c
@@ -16,7 +16,7 @@ _gen_param(const Eolian_Unit *src, Eina_Strbuf *buf,
16 Eolian_Function_Parameter *pr, Eolian_Function_Type ftype, int *rpid) 16 Eolian_Function_Parameter *pr, Eolian_Function_Type ftype, int *rpid)
17{ 17{
18 const Eolian_Type *prt = eolian_parameter_type_get(pr); 18 const Eolian_Type *prt = eolian_parameter_type_get(pr);
19 const Eolian_Typedecl *ptd = eolian_type_typedecl_get(src, prt); 19 const Eolian_Typedecl *ptd = eolian_type_typedecl_get(prt);
20 const char *prn = eolian_parameter_name_get(pr); 20 const char *prn = eolian_parameter_name_get(pr);
21 Eina_Stringshare *prtn = eolian_type_c_type_get(src, prt, EOLIAN_C_TYPE_PARAM); 21 Eina_Stringshare *prtn = eolian_type_c_type_get(src, prt, EOLIAN_C_TYPE_PARAM);
22 22
diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index a012e8c602..eb7f3853e2 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -129,7 +129,7 @@ _append_defval(const Eolian_Unit *src, Eina_Strbuf *buf,
129 eina_strbuf_append(buf, "NULL"); 129 eina_strbuf_append(buf, "NULL");
130 return; 130 return;
131 } 131 }
132 const Eolian_Typedecl *tdcl = eolian_type_typedecl_get(src, btp); 132 const Eolian_Typedecl *tdcl = eolian_type_typedecl_get(btp);
133 if (tdcl && (eolian_typedecl_type_get(tdcl) == EOLIAN_TYPEDECL_STRUCT)) 133 if (tdcl && (eolian_typedecl_type_get(tdcl) == EOLIAN_TYPEDECL_STRUCT))
134 { 134 {
135 char *sn = eo_gen_c_full_name_get(eolian_typedecl_full_name_get(tdcl)); 135 char *sn = eo_gen_c_full_name_get(eolian_typedecl_full_name_get(tdcl));
@@ -430,7 +430,7 @@ _gen_func(const Eolian_Unit *src, const Eolian_Class *cl,
430 const char *prn = eolian_parameter_name_get(pr); 430 const char *prn = eolian_parameter_name_get(pr);
431 const Eolian_Type *pt = eolian_parameter_type_get(pr); 431 const Eolian_Type *pt = eolian_parameter_type_get(pr);
432 Eina_Stringshare *ptn = eolian_type_c_type_get(src, pt, EOLIAN_C_TYPE_PARAM); 432 Eina_Stringshare *ptn = eolian_type_c_type_get(src, pt, EOLIAN_C_TYPE_PARAM);
433 const Eolian_Typedecl *ptd = eolian_type_typedecl_get(src, pt); 433 const Eolian_Typedecl *ptd = eolian_type_typedecl_get(pt);
434 434
435 Eina_Bool had_star = ptn[strlen(ptn) - 1] == '*'; 435 Eina_Bool had_star = ptn[strlen(ptn) - 1] == '*';
436 const char *add_star = _get_add_star(ftype, pd); 436 const char *add_star = _get_add_star(ftype, pd);
@@ -1061,7 +1061,7 @@ _gen_params(const Eolian_Unit *src, const Eolian_Function *fid,
1061 Eolian_Parameter_Dir pd = eolian_parameter_direction_get(pr); 1061 Eolian_Parameter_Dir pd = eolian_parameter_direction_get(pr);
1062 const char *prn = eolian_parameter_name_get(pr); 1062 const char *prn = eolian_parameter_name_get(pr);
1063 const Eolian_Type *pt = eolian_parameter_type_get(pr); 1063 const Eolian_Type *pt = eolian_parameter_type_get(pr);
1064 const Eolian_Typedecl *ptd = eolian_type_typedecl_get(src, pt); 1064 const Eolian_Typedecl *ptd = eolian_type_typedecl_get(pt);
1065 Eina_Stringshare *ptn = eolian_type_c_type_get(src, pt, EOLIAN_C_TYPE_PARAM); 1065 Eina_Stringshare *ptn = eolian_type_c_type_get(src, pt, EOLIAN_C_TYPE_PARAM);
1066 1066
1067 if (ptd && eolian_typedecl_type_get(ptd) == EOLIAN_TYPEDECL_FUNCTION_POINTER) 1067 if (ptd && eolian_typedecl_type_get(ptd) == EOLIAN_TYPEDECL_FUNCTION_POINTER)
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 5ce81a0aa3..940ad8367d 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -399,7 +399,7 @@ ffi.cdef [[
399 const Eolian_Type *eolian_type_base_type_get(const Eolian_Type *tp); 399 const Eolian_Type *eolian_type_base_type_get(const Eolian_Type *tp);
400 const Eolian_Type *eolian_type_next_type_get(const Eolian_Type *tp); 400 const Eolian_Type *eolian_type_next_type_get(const Eolian_Type *tp);
401 const Eolian_Type *eolian_typedecl_base_type_get(const Eolian_Typedecl *tp); 401 const Eolian_Type *eolian_typedecl_base_type_get(const Eolian_Typedecl *tp);
402 const Eolian_Typedecl *eolian_type_typedecl_get(const Eolian_Unit *unit, const Eolian_Type *tp); 402 const Eolian_Typedecl *eolian_type_typedecl_get(const Eolian_Type *tp);
403 403
404 const Eolian_Type *eolian_type_aliased_base_get(const Eolian_Unit *unit, const Eolian_Type *tp); 404 const Eolian_Type *eolian_type_aliased_base_get(const Eolian_Unit *unit, const Eolian_Type *tp);
405 const Eolian_Type *eolian_typedecl_aliased_base_get(const Eolian_Unit *unit, const Eolian_Typedecl *tp); 405 const Eolian_Type *eolian_typedecl_aliased_base_get(const Eolian_Unit *unit, const Eolian_Typedecl *tp);
@@ -841,8 +841,8 @@ M.Type = ffi.metatype("Eolian_Type", {
841 return v 841 return v
842 end, 842 end,
843 843
844 typedecl_get = function(self, unit) 844 typedecl_get = function(self)
845 local v = eolian.eolian_type_typedecl_get(unit, self) 845 local v = eolian.eolian_type_typedecl_get(self)
846 if v == nil then return nil end 846 if v == nil then return nil end
847 return v 847 return v
848 end, 848 end,
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index 8e9017b778..34b47c5fca 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -1956,13 +1956,12 @@ EAPI const Eolian_Type *eolian_type_next_type_get(const Eolian_Type *tp);
1956 * 1956 *
1957 * This tries to look up alias, struct and enum in that order. 1957 * This tries to look up alias, struct and enum in that order.
1958 * 1958 *
1959 * @param[in] unit the unit to look in
1960 * @param[in] tp the type. 1959 * @param[in] tp the type.
1961 * @return the pointed to type decalration or NULL. 1960 * @return the pointed to type decalration or NULL.
1962 * 1961 *
1963 * @ingroup Eolian 1962 * @ingroup Eolian
1964 */ 1963 */
1965EAPI const Eolian_Typedecl *eolian_type_typedecl_get(const Eolian_Unit *unit, const Eolian_Type *tp); 1964EAPI const Eolian_Typedecl *eolian_type_typedecl_get(const Eolian_Type *tp);
1966 1965
1967/* 1966/*
1968 * @brief Get the lowest base type of an alias stack. 1967 * @brief Get the lowest base type of an alias stack.
diff --git a/src/lib/eolian/database_expr.c b/src/lib/eolian/database_expr.c
index 1b0a6d10e3..f22a09e308 100644
--- a/src/lib/eolian/database_expr.c
+++ b/src/lib/eolian/database_expr.c
@@ -522,7 +522,7 @@ eval_exp(const Eolian_Unit *unit, const Eolian_Expression *expr,
522 const Eolian_Type *etp = eolian_typedecl_base_type_get(etpd); 522 const Eolian_Type *etp = eolian_typedecl_base_type_get(etpd);
523 if (!etp || etp->type != EOLIAN_TYPE_REGULAR) 523 if (!etp || etp->type != EOLIAN_TYPE_REGULAR)
524 break; 524 break;
525 etpd = eolian_type_typedecl_get(unit, etp); 525 etpd = database_type_decl_find(unit, etp);
526 } 526 }
527 527
528 if (!etpd) etpd = eolian_typedecl_enum_get_by_name(unit, fulln); 528 if (!etpd) etpd = eolian_typedecl_enum_get_by_name(unit, fulln);
diff --git a/src/lib/eolian/database_expr_api.c b/src/lib/eolian/database_expr_api.c
index adf573435a..791d59e104 100644
--- a/src/lib/eolian/database_expr_api.c
+++ b/src/lib/eolian/database_expr_api.c
@@ -34,7 +34,7 @@ _eval_type(const Eolian_Unit *unit, const Eolian_Expression *expr,
34 int kw = eo_lexer_keyword_str_to_id(type->name); 34 int kw = eo_lexer_keyword_str_to_id(type->name);
35 if (!kw || kw < KW_byte || kw >= KW_void) 35 if (!kw || kw < KW_byte || kw >= KW_void)
36 { 36 {
37 const Eolian_Typedecl *base = eolian_type_typedecl_get(unit, type); 37 const Eolian_Typedecl *base = database_type_decl_find(unit, type);
38 if (!base) 38 if (!base)
39 return err; 39 return err;
40 if (base->type == EOLIAN_TYPEDECL_ALIAS) 40 if (base->type == EOLIAN_TYPEDECL_ALIAS)
diff --git a/src/lib/eolian/database_type.c b/src/lib/eolian/database_type.c
index 1400aa028c..33be724c60 100644
--- a/src/lib/eolian/database_type.c
+++ b/src/lib/eolian/database_type.c
@@ -79,7 +79,7 @@ database_type_is_ownable(const Eolian_Unit *unit, const Eolian_Type *tp)
79 const char *ct = eo_lexer_get_c_type(kw); 79 const char *ct = eo_lexer_get_c_type(kw);
80 if (!ct) 80 if (!ct)
81 { 81 {
82 const Eolian_Typedecl *tpp = eolian_type_typedecl_get(unit, tp); 82 const Eolian_Typedecl *tpp = database_type_decl_find(unit, tp);
83 if (!tpp) 83 if (!tpp)
84 return EINA_FALSE; 84 return EINA_FALSE;
85 if (tpp->type == EOLIAN_TYPEDECL_FUNCTION_POINTER) 85 if (tpp->type == EOLIAN_TYPEDECL_FUNCTION_POINTER)
@@ -269,3 +269,23 @@ database_typedecl_to_str(const Eolian_Unit *src, const Eolian_Typedecl *tp,
269 break; 269 break;
270 } 270 }
271} 271}
272
273Eolian_Typedecl *database_type_decl_find(const Eolian_Unit *unit, const Eolian_Type *tp)
274{
275 if (tp->type != EOLIAN_TYPE_REGULAR)
276 return NULL;
277 if (tp->tdecl)
278 return tp->tdecl;
279 /* try looking up if it belongs to a struct, enum or an alias... otherwise
280 * return NULL, but first check for builtins
281 */
282 int kw = eo_lexer_keyword_str_to_id(tp->full_name);
283 if (!kw || kw < KW_byte || kw >= KW_true)
284 {
285 Eolian_Declaration *decl = eina_hash_find(unit->state->unit.decls, tp->full_name);
286 if (decl && decl->type != EOLIAN_DECL_CLASS
287 && decl->type != EOLIAN_DECL_VAR)
288 return decl->data;
289 }
290 return NULL;
291}
diff --git a/src/lib/eolian/database_type_api.c b/src/lib/eolian/database_type_api.c
index 4528b7c9ed..eedb42a828 100644
--- a/src/lib/eolian/database_type_api.c
+++ b/src/lib/eolian/database_type_api.c
@@ -266,23 +266,12 @@ eolian_type_next_type_get(const Eolian_Type *tp)
266} 266}
267 267
268EAPI const Eolian_Typedecl * 268EAPI const Eolian_Typedecl *
269eolian_type_typedecl_get(const Eolian_Unit *unit, const Eolian_Type *tp) 269eolian_type_typedecl_get(const Eolian_Type *tp)
270{ 270{
271 EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL); 271 EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
272 if (eolian_type_type_get(tp) != EOLIAN_TYPE_REGULAR) 272 if (eolian_type_type_get(tp) != EOLIAN_TYPE_REGULAR)
273 return NULL; 273 return NULL;
274 /* try looking up if it belongs to a struct, enum or an alias... otherwise 274 return tp->tdecl;
275 * return NULL, but first check for builtins
276 */
277 int kw = eo_lexer_keyword_str_to_id(tp->full_name);
278 if (!kw || kw < KW_byte || kw >= KW_true)
279 {
280 Eolian_Declaration *decl = eina_hash_find(unit->state->unit.decls, tp->full_name);
281 if (decl && decl->type != EOLIAN_DECL_CLASS
282 && decl->type != EOLIAN_DECL_VAR)
283 return decl->data;
284 }
285 return NULL;
286} 275}
287 276
288EAPI const Eolian_Type * 277EAPI const Eolian_Type *
@@ -297,7 +286,7 @@ eolian_type_aliased_base_get(const Eolian_Unit *unit, const Eolian_Type *tp)
297{ 286{
298 if (!tp || tp->type != EOLIAN_TYPE_REGULAR || tp->is_ptr) 287 if (!tp || tp->type != EOLIAN_TYPE_REGULAR || tp->is_ptr)
299 return tp; 288 return tp;
300 const Eolian_Typedecl *btp = eolian_type_typedecl_get(unit, tp); 289 const Eolian_Typedecl *btp = database_type_decl_find(unit, tp);
301 if (btp && (btp->type == EOLIAN_TYPEDECL_ALIAS)) 290 if (btp && (btp->type == EOLIAN_TYPEDECL_ALIAS))
302 return eolian_typedecl_aliased_base_get(unit, btp); 291 return eolian_typedecl_aliased_base_get(unit, btp);
303 return tp; 292 return tp;
diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c
index fbbf26e03d..c5b3664201 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -252,7 +252,7 @@ _validate_type(const Eolian_Unit *src, Eolian_Type *tp)
252 return _validate(&tp->base); 252 return _validate(&tp->base);
253 } 253 }
254 /* user defined */ 254 /* user defined */
255 tp->tdecl = (Eolian_Typedecl *)eolian_type_typedecl_get(src, tp); 255 tp->tdecl = database_type_decl_find(src, tp);
256 if (!tp->tdecl) 256 if (!tp->tdecl)
257 { 257 {
258 snprintf(buf, sizeof(buf), "undefined type %s", tp->full_name); 258 snprintf(buf, sizeof(buf), "undefined type %s", tp->full_name);
diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h
index 00a3967183..5f804a5aa9 100644
--- a/src/lib/eolian/eolian_database.h
+++ b/src/lib/eolian/eolian_database.h
@@ -341,6 +341,8 @@ void database_typedecl_del(Eolian_Typedecl *tp);
341void database_type_to_str(const Eolian_Unit *src, const Eolian_Type *tp, Eina_Strbuf *buf, const char *name, Eolian_C_Type_Type ctype); 341void database_type_to_str(const Eolian_Unit *src, const Eolian_Type *tp, Eina_Strbuf *buf, const char *name, Eolian_C_Type_Type ctype);
342void database_typedecl_to_str(const Eolian_Unit *src, const Eolian_Typedecl *tp, Eina_Strbuf *buf); 342void database_typedecl_to_str(const Eolian_Unit *src, const Eolian_Typedecl *tp, Eina_Strbuf *buf);
343 343
344Eolian_Typedecl *database_type_decl_find(const Eolian_Unit *src, const Eolian_Type *tp);
345
344Eina_Bool database_type_is_ownable(const Eolian_Unit *unit, const Eolian_Type *tp); 346Eina_Bool database_type_is_ownable(const Eolian_Unit *unit, const Eolian_Type *tp);
345 347
346/* expressions */ 348/* expressions */
diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp b/src/lib/eolian_cxx/grammar/klass_def.hpp
index e7e6018872..3872feaf4a 100644
--- a/src/lib/eolian_cxx/grammar/klass_def.hpp
+++ b/src/lib/eolian_cxx/grammar/klass_def.hpp
@@ -353,7 +353,7 @@ inline void type_def::set(Eolian_Type const* eolian_type, Eolian_Unit const* uni
353 if (!stp) 353 if (!stp)
354 { 354 {
355 bool is_undefined = false; 355 bool is_undefined = false;
356 Eolian_Typedecl const* decl = eolian_type_typedecl_get(unit, eolian_type); 356 Eolian_Typedecl const* decl = eolian_type_typedecl_get(eolian_type);
357 typedecl_type type_type = (decl ? typedecl_type_get(decl) : typedecl_type::unknown); 357 typedecl_type type_type = (decl ? typedecl_type_get(decl) : typedecl_type::unknown);
358 if(decl && eolian_typedecl_type_get(decl) == EOLIAN_TYPEDECL_ALIAS) 358 if(decl && eolian_typedecl_type_get(decl) == EOLIAN_TYPEDECL_ALIAS)
359 { 359 {
diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py
index 9146f5245b..60bfdba0c1 100644
--- a/src/scripts/pyolian/eolian.py
+++ b/src/scripts/pyolian/eolian.py
@@ -1065,11 +1065,10 @@ class Type(EolianBaseObject): # OK (4 TODO Unit*)
1065 # return _str_to_py(lib.eolian_type_c_type_get(self._obj)) 1065 # return _str_to_py(lib.eolian_type_c_type_get(self._obj))
1066 return 'FIXME' 1066 return 'FIXME'
1067 1067
1068 # TODO FIXME STRANGE API (need Eolian_Unit*) 1068 @cached_property
1069 # @cached_property 1069 def typedecl(self):
1070 # def typedecl(self): 1070 c_tdecl = lib.eolian_type_typedecl_get(self._obj)
1071 # c_tdecl = lib.eolian_type_typedecl_get(self._obj) 1071 return Typedecl(c_tdecl) if c_tdecl else None
1072 # return Typedecl(c_tdecl) if c_tdecl else None
1073 1072
1074 @cached_property 1073 @cached_property
1075 def base_type(self): 1074 def base_type(self):
diff --git a/src/scripts/pyolian/eolian_lib.py b/src/scripts/pyolian/eolian_lib.py
index 945f15d4c2..2e67cb0563 100644
--- a/src/scripts/pyolian/eolian_lib.py
+++ b/src/scripts/pyolian/eolian_lib.py
@@ -550,10 +550,9 @@ lib.eolian_type_base_type_get.restype = c_void_p
550lib.eolian_type_next_type_get.argtypes = [c_void_p,] 550lib.eolian_type_next_type_get.argtypes = [c_void_p,]
551lib.eolian_type_next_type_get.restype = c_void_p 551lib.eolian_type_next_type_get.restype = c_void_p
552 552
553# TODO FIXME STRANGE API (need Eolian_Unit*) 553# EAPI const Eolian_Typedecl *eolian_type_typedecl_get(const Eolian_Type *tp);
554# EAPI const Eolian_Typedecl *eolian_type_typedecl_get(const Eolian_Unit *unit, const Eolian_Type *tp); 554lib.eolian_type_typedecl_get.argtypes = [c_void_p,]
555# lib.eolian_type_typedecl_get.argtypes = [c_void_p,] 555lib.eolian_type_typedecl_get.restype = c_void_p
556# lib.eolian_type_typedecl_get.restype = c_void_p
557 556
558# TODO FIXME STRANGE API (need Eolian_Unit*) 557# TODO FIXME STRANGE API (need Eolian_Unit*)
559# EAPI const Eolian_Type *eolian_type_aliased_base_get(const Eolian_Unit *unit, const Eolian_Type *tp); 558# EAPI const Eolian_Type *eolian_type_aliased_base_get(const Eolian_Unit *unit, const Eolian_Type *tp);
diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c
index 8227a568f9..79f611ab41 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -724,7 +724,7 @@ START_TEST(eolian_struct)
724 fail_if(!(type_name = eolian_type_name_get(ftype))); 724 fail_if(!(type_name = eolian_type_name_get(ftype)));
725 fail_if(strcmp(type_name, "Named")); 725 fail_if(strcmp(type_name, "Named"));
726 fail_if(eolian_type_type_get(ftype) != EOLIAN_TYPE_REGULAR); 726 fail_if(eolian_type_type_get(ftype) != EOLIAN_TYPE_REGULAR);
727 fail_if(eolian_typedecl_type_get(eolian_type_typedecl_get(unit, ftype)) 727 fail_if(eolian_typedecl_type_get(eolian_type_typedecl_get(ftype))
728 != EOLIAN_TYPEDECL_STRUCT); 728 != EOLIAN_TYPEDECL_STRUCT);
729 729
730 /* opaque struct */ 730 /* opaque struct */
@@ -736,7 +736,7 @@ START_TEST(eolian_struct)
736 fail_if(!(type = eolian_function_return_type_get(func, EOLIAN_METHOD))); 736 fail_if(!(type = eolian_function_return_type_get(func, EOLIAN_METHOD)));
737 fail_if(eolian_type_type_get(type) != EOLIAN_TYPE_REGULAR); 737 fail_if(eolian_type_type_get(type) != EOLIAN_TYPE_REGULAR);
738 fail_if(!eolian_type_is_ptr(type)); 738 fail_if(!eolian_type_is_ptr(type));
739 fail_if(!(tdl = eolian_type_typedecl_get(unit, type))); 739 fail_if(!(tdl = eolian_type_typedecl_get(type)));
740 fail_if(eolian_typedecl_type_get(tdl) != EOLIAN_TYPEDECL_STRUCT); 740 fail_if(eolian_typedecl_type_get(tdl) != EOLIAN_TYPEDECL_STRUCT);
741 741
742 eolian_free(eos); 742 eolian_free(eos);
@@ -1536,7 +1536,7 @@ START_TEST(eolian_function_types)
1536 fail_if(eolian_type_is_owned(type)); 1536 fail_if(eolian_type_is_owned(type));
1537 fail_if(!(type_name = eolian_type_name_get(type))); 1537 fail_if(!(type_name = eolian_type_name_get(type)));
1538 fail_if(strcmp(type_name, "VoidFunc")); 1538 fail_if(strcmp(type_name, "VoidFunc"));
1539 fail_if(!(arg_decl = eolian_type_typedecl_get(unit, type))); 1539 fail_if(!(arg_decl = eolian_type_typedecl_get(type)));
1540 fail_if(eolian_typedecl_type_get(arg_decl) != EOLIAN_TYPEDECL_FUNCTION_POINTER); 1540 fail_if(eolian_typedecl_type_get(arg_decl) != EOLIAN_TYPEDECL_FUNCTION_POINTER);
1541 1541
1542 fail_if(!(eina_iterator_next(iter, (void**)&param))); 1542 fail_if(!(eina_iterator_next(iter, (void**)&param)));
@@ -1547,7 +1547,7 @@ START_TEST(eolian_function_types)
1547 fail_if(eolian_type_type_get(type) != EOLIAN_TYPE_REGULAR); 1547 fail_if(eolian_type_type_get(type) != EOLIAN_TYPE_REGULAR);
1548 fail_if(!(type_name = eolian_type_name_get(type))); 1548 fail_if(!(type_name = eolian_type_name_get(type)));
1549 fail_if(strcmp(type_name, "SimpleFunc")); 1549 fail_if(strcmp(type_name, "SimpleFunc"));
1550 fail_if(!(arg_decl = eolian_type_typedecl_get(unit, type))); 1550 fail_if(!(arg_decl = eolian_type_typedecl_get(type)));
1551 fail_if(eolian_typedecl_type_get(arg_decl) != EOLIAN_TYPEDECL_FUNCTION_POINTER); 1551 fail_if(eolian_typedecl_type_get(arg_decl) != EOLIAN_TYPEDECL_FUNCTION_POINTER);
1552 1552
1553 fail_if(eina_iterator_next(iter, &dummy)); 1553 fail_if(eina_iterator_next(iter, &dummy));
@@ -1589,7 +1589,7 @@ START_TEST(eolian_function_as_arguments)
1589 fail_if(eolian_type_is_owned(type)); 1589 fail_if(eolian_type_is_owned(type));
1590 fail_if(!(type_name = eolian_type_name_get(type))); 1590 fail_if(!(type_name = eolian_type_name_get(type)));
1591 fail_if(strcmp(type_name, "SimpleFunc")); 1591 fail_if(strcmp(type_name, "SimpleFunc"));
1592 fail_if(!(arg_decl = eolian_type_typedecl_get(unit, type))); 1592 fail_if(!(arg_decl = eolian_type_typedecl_get(type)));
1593 fail_if(eolian_typedecl_type_get(arg_decl) != EOLIAN_TYPEDECL_FUNCTION_POINTER); 1593 fail_if(eolian_typedecl_type_get(arg_decl) != EOLIAN_TYPEDECL_FUNCTION_POINTER);
1594 1594
1595 fail_if(eina_iterator_next(iter, &dummy)); 1595 fail_if(eina_iterator_next(iter, &dummy));