summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2017-12-15 17:00:36 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2017-12-15 17:11:11 +0100
commit18e18ca74c5456e0ecb7f03065959fb9fb7b58f4 (patch)
treeeda220d83a70bdec5b2b14227fa1bac8d3381b3c /src/bin
parentd624464ab4c61140ed3d46a2bbc183b8cb500d2b (diff)
eolian: remove remaining global state (+ modify APIs accordingly)
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/eolian/docs.c2
-rw-r--r--src/bin/eolian/headers.c18
-rw-r--r--src/bin/eolian/headers.h2
-rw-r--r--src/bin/eolian/sources.c51
-rw-r--r--src/bin/eolian/types.c10
5 files changed, 43 insertions, 40 deletions
diff --git a/src/bin/eolian/docs.c b/src/bin/eolian/docs.c
index 09e63bf9ac..a38ac19ff7 100644
--- a/src/bin/eolian/docs.c
+++ b/src/bin/eolian/docs.c
@@ -377,7 +377,7 @@ eo_gen_docs_event_gen(const Eolian_Unit *src, const Eolian_Event *ev,
377 if (rt) 377 if (rt)
378 { 378 {
379 p = buf; 379 p = buf;
380 Eina_Stringshare *rts = eolian_type_c_type_get(rt, EOLIAN_C_TYPE_DEFAULT); 380 Eina_Stringshare *rts = eolian_type_c_type_get(src, rt, EOLIAN_C_TYPE_DEFAULT);
381 snprintf(buf, sizeof(buf), "@return %s", rts); 381 snprintf(buf, sizeof(buf), "@return %s", rts);
382 eina_stringshare_del(rts); 382 eina_stringshare_del(rts);
383 } 383 }
diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c
index 90fc1ea611..b2fe73a00c 100644
--- a/src/bin/eolian/headers.c
+++ b/src/bin/eolian/headers.c
@@ -12,12 +12,13 @@ _get_add_star(Eolian_Function_Type ftype, Eolian_Parameter_Dir pdir)
12} 12}
13 13
14static int 14static int
15_gen_param(Eina_Strbuf *buf, Eolian_Function_Parameter *pr, Eolian_Function_Type ftype, int *rpid) 15_gen_param(const Eolian_Unit *src, Eina_Strbuf *buf,
16 Eolian_Function_Parameter *pr, Eolian_Function_Type ftype, int *rpid)
16{ 17{
17 const Eolian_Type *prt = eolian_parameter_type_get(pr); 18 const Eolian_Type *prt = eolian_parameter_type_get(pr);
18 const Eolian_Typedecl *ptd = eolian_type_typedecl_get(prt); 19 const Eolian_Typedecl *ptd = eolian_type_typedecl_get(src, prt);
19 const char *prn = eolian_parameter_name_get(pr); 20 const char *prn = eolian_parameter_name_get(pr);
20 Eina_Stringshare *prtn = eolian_type_c_type_get(prt, EOLIAN_C_TYPE_PARAM); 21 Eina_Stringshare *prtn = eolian_type_c_type_get(src, prt, EOLIAN_C_TYPE_PARAM);
21 22
22 if (ptd && (eolian_typedecl_type_get(ptd) == EOLIAN_TYPEDECL_FUNCTION_POINTER)) 23 if (ptd && (eolian_typedecl_type_get(ptd) == EOLIAN_TYPEDECL_FUNCTION_POINTER))
23 { 24 {
@@ -39,7 +40,8 @@ _gen_param(Eina_Strbuf *buf, Eolian_Function_Parameter *pr, Eolian_Function_Type
39} 40}
40 41
41void 42void
42eo_gen_params(Eina_Iterator *itr, Eina_Strbuf *buf, Eina_Strbuf **flagbuf, int *nidx, Eolian_Function_Type ftype) 43eo_gen_params(const Eolian_Unit *src, Eina_Iterator *itr, Eina_Strbuf *buf,
44 Eina_Strbuf **flagbuf, int *nidx, Eolian_Function_Type ftype)
43{ 45{
44 Eolian_Function_Parameter *pr; 46 Eolian_Function_Parameter *pr;
45 EINA_ITERATOR_FOREACH(itr, pr) 47 EINA_ITERATOR_FOREACH(itr, pr)
@@ -47,7 +49,7 @@ eo_gen_params(Eina_Iterator *itr, Eina_Strbuf *buf, Eina_Strbuf **flagbuf, int *
47 int rpid = 0; 49 int rpid = 0;
48 if (*nidx) 50 if (*nidx)
49 eina_strbuf_append(buf, ", "); 51 eina_strbuf_append(buf, ", ");
50 *nidx += _gen_param(buf, pr, ftype, &rpid); 52 *nidx += _gen_param(src, buf, pr, ftype, &rpid);
51 53
52 if (!eolian_parameter_is_nonull(pr) || !flagbuf) 54 if (!eolian_parameter_is_nonull(pr) || !flagbuf)
53 continue; 55 continue;
@@ -110,7 +112,7 @@ _gen_func(const Eolian_Unit *src, const Eolian_Function *fid,
110 eina_strbuf_append(buf, legacy ? "EAPI " : "EOAPI "); 112 eina_strbuf_append(buf, legacy ? "EAPI " : "EOAPI ");
111 if (rtp) 113 if (rtp)
112 { 114 {
113 Eina_Stringshare *rtps = eolian_type_c_type_get(rtp, EOLIAN_C_TYPE_RETURN); 115 Eina_Stringshare *rtps = eolian_type_c_type_get(src, rtp, EOLIAN_C_TYPE_RETURN);
114 eina_strbuf_append(buf, rtps); 116 eina_strbuf_append(buf, rtps);
115 if (rtps[strlen(rtps) - 1] != '*') 117 if (rtps[strlen(rtps) - 1] != '*')
116 eina_strbuf_append_char(buf, ' '); 118 eina_strbuf_append_char(buf, ' ');
@@ -139,7 +141,7 @@ _gen_func(const Eolian_Unit *src, const Eolian_Function *fid,
139 eina_strbuf_append(buf, "Eo *obj"); 141 eina_strbuf_append(buf, "Eo *obj");
140 } 142 }
141 143
142 eo_gen_params(eolian_property_keys_get(fid, ftype), buf, &flagbuf, &nidx, EOLIAN_PROPERTY); 144 eo_gen_params(src, eolian_property_keys_get(fid, ftype), buf, &flagbuf, &nidx, EOLIAN_PROPERTY);
143 145
144 if (!var_as_ret) 146 if (!var_as_ret)
145 { 147 {
@@ -148,7 +150,7 @@ _gen_func(const Eolian_Unit *src, const Eolian_Function *fid,
148 itr = eolian_property_values_get(fid, ftype); 150 itr = eolian_property_values_get(fid, ftype);
149 else 151 else
150 itr = eolian_function_parameters_get(fid); 152 itr = eolian_function_parameters_get(fid);
151 eo_gen_params(itr, buf, &flagbuf, &nidx, ftype); 153 eo_gen_params(src, itr, buf, &flagbuf, &nidx, ftype);
152 } 154 }
153 155
154 if (flagbuf) 156 if (flagbuf)
diff --git a/src/bin/eolian/headers.h b/src/bin/eolian/headers.h
index 56e4b4ffdf..41c7658b96 100644
--- a/src/bin/eolian/headers.h
+++ b/src/bin/eolian/headers.h
@@ -3,7 +3,7 @@
3 3
4#include "main.h" 4#include "main.h"
5 5
6void eo_gen_params(Eina_Iterator *itr, Eina_Strbuf *buf, Eina_Strbuf **flagbuf, int *nidx, Eolian_Function_Type ftype); 6void eo_gen_params(const Eolian_Unit *src, Eina_Iterator *itr, Eina_Strbuf *buf, Eina_Strbuf **flagbuf, int *nidx, Eolian_Function_Type ftype);
7void eo_gen_header_gen(const Eolian_Unit *src, const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Bool legacy); 7void eo_gen_header_gen(const Eolian_Unit *src, const Eolian_Class *cl, Eina_Strbuf *buf, Eina_Bool legacy);
8 8
9#endif 9#endif
diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index a8a349fa86..a012e8c602 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -123,13 +123,13 @@ _append_defval(const Eolian_Unit *src, Eina_Strbuf *buf,
123 else WRN("evaluation of default value failed"); 123 else WRN("evaluation of default value failed");
124 } 124 }
125 /* default value or fallback */ 125 /* default value or fallback */
126 const Eolian_Type *btp = eolian_type_aliased_base_get(tp); 126 const Eolian_Type *btp = eolian_type_aliased_base_get(src, tp);
127 if (eolian_type_is_ptr(btp)) 127 if (eolian_type_is_ptr(btp))
128 { 128 {
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(btp); 132 const Eolian_Typedecl *tdcl = eolian_type_typedecl_get(src, 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));
@@ -140,7 +140,7 @@ _append_defval(const Eolian_Unit *src, Eina_Strbuf *buf,
140 free(sn); 140 free(sn);
141 return; 141 return;
142 } 142 }
143 Eina_Stringshare *ctp = eolian_type_c_type_get(btp, EOLIAN_C_TYPE_DEFAULT); 143 Eina_Stringshare *ctp = eolian_type_c_type_get(src, btp, EOLIAN_C_TYPE_DEFAULT);
144 if (strchr(ctp, '*')) 144 if (strchr(ctp, '*'))
145 { 145 {
146 eina_strbuf_append(buf, "NULL"); 146 eina_strbuf_append(buf, "NULL");
@@ -182,7 +182,7 @@ _generate_loop_content(Eina_Strbuf **buf, const Eolian_Type *inner_type, const E
182} 182}
183 183
184static void 184static void
185_generate_iterative_free(Eina_Strbuf **buf, const Eolian_Type *type, const Eolian_Type *inner_type, Eolian_Function_Parameter *parameter, Eina_Strbuf *param) 185_generate_iterative_free(const Eolian_Unit *src, Eina_Strbuf **buf, const Eolian_Type *type, const Eolian_Type *inner_type, Eolian_Function_Parameter *parameter, Eina_Strbuf *param)
186{ 186{
187 Eina_Strbuf *iterator_header, *iter_param; 187 Eina_Strbuf *iterator_header, *iter_param;
188 188
@@ -194,7 +194,7 @@ _generate_iterative_free(Eina_Strbuf **buf, const Eolian_Type *type, const Eolia
194 eina_strbuf_append_printf(iter_param, "%s_iter", eolian_parameter_name_get(parameter)); 194 eina_strbuf_append_printf(iter_param, "%s_iter", eolian_parameter_name_get(parameter));
195 195
196 //generate the field definition 196 //generate the field definition
197 eina_strbuf_append_printf(*buf, " %s", eolian_type_c_type_get(inner_type, EOLIAN_C_TYPE_DEFAULT)); 197 eina_strbuf_append_printf(*buf, " %s", eolian_type_c_type_get(src, inner_type, EOLIAN_C_TYPE_DEFAULT));
198 if(t == EOLIAN_TYPE_BUILTIN_INARRAY 198 if(t == EOLIAN_TYPE_BUILTIN_INARRAY
199 || t == EOLIAN_TYPE_BUILTIN_INLIST) 199 || t == EOLIAN_TYPE_BUILTIN_INLIST)
200 { 200 {
@@ -328,7 +328,7 @@ _gen_func(const Eolian_Unit *src, const Eolian_Class *cl,
328 { 328 {
329 const char *prn = eolian_parameter_name_get(pr); 329 const char *prn = eolian_parameter_name_get(pr);
330 const Eolian_Type *pt = eolian_parameter_type_get(pr); 330 const Eolian_Type *pt = eolian_parameter_type_get(pr);
331 Eina_Stringshare *ptn = eolian_type_c_type_get(pt, EOLIAN_C_TYPE_PARAM); 331 Eina_Stringshare *ptn = eolian_type_c_type_get(src, pt, EOLIAN_C_TYPE_PARAM);
332 332
333 if (eina_strbuf_length_get(params)) 333 if (eina_strbuf_length_get(params))
334 eina_strbuf_append(params, ", "); 334 eina_strbuf_append(params, ", ");
@@ -400,7 +400,7 @@ _gen_func(const Eolian_Unit *src, const Eolian_Class *cl,
400 } 400 }
401 else if (inner_type && eolian_type_is_owned(inner_type)) 401 else if (inner_type && eolian_type_is_owned(inner_type))
402 { 402 {
403 _generate_iterative_free(&fallback_free_ownership, type, inner_type, pr, param_call); 403 _generate_iterative_free(src, &fallback_free_ownership, type, inner_type, pr, param_call);
404 } 404 }
405 } 405 }
406 eina_iterator_free(itr); 406 eina_iterator_free(itr);
@@ -429,8 +429,8 @@ _gen_func(const Eolian_Unit *src, const Eolian_Class *cl,
429 const Eolian_Expression *dfv = eolian_parameter_default_value_get(pr); 429 const Eolian_Expression *dfv = eolian_parameter_default_value_get(pr);
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(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(pt); 433 const Eolian_Typedecl *ptd = eolian_type_typedecl_get(src, 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);
@@ -501,7 +501,7 @@ _gen_func(const Eolian_Unit *src, const Eolian_Class *cl,
501 if (impl_same_class && eolian_implement_is_pure_virtual(impl, ftype)) 501 if (impl_same_class && eolian_implement_is_pure_virtual(impl, ftype))
502 impl_need = EINA_FALSE; 502 impl_need = EINA_FALSE;
503 503
504 Eina_Stringshare *rtpn = rtp ? eolian_type_c_type_get(rtp, EOLIAN_C_TYPE_RETURN) 504 Eina_Stringshare *rtpn = rtp ? eolian_type_c_type_get(src, rtp, EOLIAN_C_TYPE_RETURN)
505 : eina_stringshare_add("void"); 505 : eina_stringshare_add("void");
506 506
507 char *cname = NULL, *cnamel = NULL, *ocnamel = NULL; 507 char *cname = NULL, *cnamel = NULL, *ocnamel = NULL;
@@ -1018,8 +1018,9 @@ eo_gen_source_gen(const Eolian_Unit *src,
1018} 1018}
1019 1019
1020static void 1020static void
1021_gen_params(const Eolian_Function *fid, Eolian_Function_Type ftype, 1021_gen_params(const Eolian_Unit *src, const Eolian_Function *fid,
1022 Eina_Bool var_as_ret, Eina_Strbuf *params, Eina_Strbuf *params_full) 1022 Eolian_Function_Type ftype, Eina_Bool var_as_ret,
1023 Eina_Strbuf *params, Eina_Strbuf *params_full)
1023{ 1024{
1024 Eina_Bool is_prop = (ftype == EOLIAN_PROP_GET || ftype == EOLIAN_PROP_SET); 1025 Eina_Bool is_prop = (ftype == EOLIAN_PROP_GET || ftype == EOLIAN_PROP_SET);
1025 1026
@@ -1031,7 +1032,7 @@ _gen_params(const Eolian_Function *fid, Eolian_Function_Type ftype,
1031 { 1032 {
1032 const char *prn = eolian_parameter_name_get(pr); 1033 const char *prn = eolian_parameter_name_get(pr);
1033 const Eolian_Type *pt = eolian_parameter_type_get(pr); 1034 const Eolian_Type *pt = eolian_parameter_type_get(pr);
1034 Eina_Stringshare *ptn = eolian_type_c_type_get(pt, EOLIAN_C_TYPE_PARAM); 1035 Eina_Stringshare *ptn = eolian_type_c_type_get(src, pt, EOLIAN_C_TYPE_PARAM);
1035 1036
1036 eina_strbuf_append(params, ", "); 1037 eina_strbuf_append(params, ", ");
1037 eina_strbuf_append(params, prn); 1038 eina_strbuf_append(params, prn);
@@ -1060,8 +1061,8 @@ _gen_params(const Eolian_Function *fid, Eolian_Function_Type ftype,
1060 Eolian_Parameter_Dir pd = eolian_parameter_direction_get(pr); 1061 Eolian_Parameter_Dir pd = eolian_parameter_direction_get(pr);
1061 const char *prn = eolian_parameter_name_get(pr); 1062 const char *prn = eolian_parameter_name_get(pr);
1062 const Eolian_Type *pt = eolian_parameter_type_get(pr); 1063 const Eolian_Type *pt = eolian_parameter_type_get(pr);
1063 const Eolian_Typedecl *ptd = eolian_type_typedecl_get(pt); 1064 const Eolian_Typedecl *ptd = eolian_type_typedecl_get(src, pt);
1064 Eina_Stringshare *ptn = eolian_type_c_type_get(pt, EOLIAN_C_TYPE_PARAM); 1065 Eina_Stringshare *ptn = eolian_type_c_type_get(src, pt, EOLIAN_C_TYPE_PARAM);
1065 1066
1066 if (ptd && eolian_typedecl_type_get(ptd) == EOLIAN_TYPEDECL_FUNCTION_POINTER) 1067 if (ptd && eolian_typedecl_type_get(ptd) == EOLIAN_TYPEDECL_FUNCTION_POINTER)
1067 { 1068 {
@@ -1092,9 +1093,9 @@ _gen_params(const Eolian_Function *fid, Eolian_Function_Type ftype,
1092} 1093}
1093 1094
1094static void 1095static void
1095_gen_proto(const Eolian_Class *cl, const Eolian_Function *fid, 1096_gen_proto(const Eolian_Unit *src, const Eolian_Class *cl,
1096 Eolian_Function_Type ftype, Eina_Strbuf *buf, 1097 const Eolian_Function *fid, Eolian_Function_Type ftype,
1097 const Eolian_Implement *impl, const char *dtype, 1098 Eina_Strbuf *buf, const Eolian_Implement *impl, const char *dtype,
1098 const char *cnamel) 1099 const char *cnamel)
1099{ 1100{
1100 Eina_Bool impl_same_class = (eolian_implement_class_get(impl) == cl); 1101 Eina_Bool impl_same_class = (eolian_implement_class_get(impl) == cl);
@@ -1141,7 +1142,7 @@ _gen_proto(const Eolian_Class *cl, const Eolian_Function *fid,
1141 eina_strbuf_append(buf, "EOLIAN static "); 1142 eina_strbuf_append(buf, "EOLIAN static ");
1142 if (rtp) 1143 if (rtp)
1143 { 1144 {
1144 Eina_Stringshare *rtpn = eolian_type_c_type_get(rtp, EOLIAN_C_TYPE_RETURN); 1145 Eina_Stringshare *rtpn = eolian_type_c_type_get(src, rtp, EOLIAN_C_TYPE_RETURN);
1145 eina_strbuf_append(buf, rtpn); 1146 eina_strbuf_append(buf, rtpn);
1146 eina_stringshare_del(rtpn); 1147 eina_stringshare_del(rtpn);
1147 } 1148 }
@@ -1162,7 +1163,7 @@ _gen_proto(const Eolian_Class *cl, const Eolian_Function *fid,
1162 /* gen params here */ 1163 /* gen params here */
1163 Eina_Strbuf *params = eina_strbuf_new(); 1164 Eina_Strbuf *params = eina_strbuf_new();
1164 Eina_Strbuf *params_full = eina_strbuf_new(); 1165 Eina_Strbuf *params_full = eina_strbuf_new();
1165 _gen_params(fid, ftype, var_as_ret, params, params_full); 1166 _gen_params(src, fid, ftype, var_as_ret, params, params_full);
1166 1167
1167 if (eina_strbuf_length_get(params_full)) 1168 if (eina_strbuf_length_get(params_full))
1168 eina_strbuf_append(buf, eina_strbuf_string_get(params_full)); 1169 eina_strbuf_append(buf, eina_strbuf_string_get(params_full));
@@ -1192,7 +1193,7 @@ _gen_proto(const Eolian_Class *cl, const Eolian_Function *fid,
1192} 1193}
1193 1194
1194void 1195void
1195eo_gen_impl_gen(const Eolian_Unit *src EINA_UNUSED, 1196eo_gen_impl_gen(const Eolian_Unit *src,
1196 const Eolian_Class *cl, Eina_Strbuf *buf) 1197 const Eolian_Class *cl, Eina_Strbuf *buf)
1197{ 1198{
1198 if (!cl) 1199 if (!cl)
@@ -1243,14 +1244,14 @@ eo_gen_impl_gen(const Eolian_Unit *src EINA_UNUSED,
1243 { 1244 {
1244 case EOLIAN_PROP_GET: 1245 case EOLIAN_PROP_GET:
1245 case EOLIAN_PROP_SET: 1246 case EOLIAN_PROP_SET:
1246 _gen_proto(cl, fid, ftype, buf, imp, dt, cnamel); 1247 _gen_proto(src, cl, fid, ftype, buf, imp, dt, cnamel);
1247 break; 1248 break;
1248 case EOLIAN_PROPERTY: 1249 case EOLIAN_PROPERTY:
1249 _gen_proto(cl, fid, EOLIAN_PROP_SET, buf, imp, dt, cnamel); 1250 _gen_proto(src, cl, fid, EOLIAN_PROP_SET, buf, imp, dt, cnamel);
1250 _gen_proto(cl, fid, EOLIAN_PROP_GET, buf, imp, dt, cnamel); 1251 _gen_proto(src, cl, fid, EOLIAN_PROP_GET, buf, imp, dt, cnamel);
1251 break; 1252 break;
1252 default: 1253 default:
1253 _gen_proto(cl, fid, EOLIAN_METHOD, buf, imp, dt, cnamel); 1254 _gen_proto(src, cl, fid, EOLIAN_METHOD, buf, imp, dt, cnamel);
1254 } 1255 }
1255 } 1256 }
1256 eina_iterator_free(itr); 1257 eina_iterator_free(itr);
diff --git a/src/bin/eolian/types.c b/src/bin/eolian/types.c
index c98791e965..d8285fbeb4 100644
--- a/src/bin/eolian/types.c
+++ b/src/bin/eolian/types.c
@@ -41,7 +41,7 @@ _type_generate(const Eolian_Unit *src, const Eolian_Typedecl *tp,
41 { 41 {
42 const Eolian_Type *mtp = eolian_typedecl_struct_field_type_get(memb); 42 const Eolian_Type *mtp = eolian_typedecl_struct_field_type_get(memb);
43 Eina_Stringshare *ct = NULL; 43 Eina_Stringshare *ct = NULL;
44 ct = eolian_type_c_type_get(mtp, EOLIAN_C_TYPE_DEFAULT); 44 ct = eolian_type_c_type_get(src, mtp, EOLIAN_C_TYPE_DEFAULT);
45 eina_strbuf_append_printf(buf, " %s%s%s;", 45 eina_strbuf_append_printf(buf, " %s%s%s;",
46 ct, strchr(ct, '*') ? "" : " ", 46 ct, strchr(ct, '*') ? "" : " ",
47 eolian_typedecl_struct_field_name_get(memb)); 47 eolian_typedecl_struct_field_name_get(memb));
@@ -135,7 +135,7 @@ _type_generate(const Eolian_Unit *src, const Eolian_Typedecl *tp,
135 eina_strbuf_append(buf, "void "); 135 eina_strbuf_append(buf, "void ");
136 else 136 else
137 { 137 {
138 Eina_Stringshare *ct = eolian_type_c_type_get(rtp, EOLIAN_C_TYPE_RETURN); 138 Eina_Stringshare *ct = eolian_type_c_type_get(src, rtp, EOLIAN_C_TYPE_RETURN);
139 eina_strbuf_append_printf(buf, "%s ", ct); 139 eina_strbuf_append_printf(buf, "%s ", ct);
140 } 140 }
141 141
@@ -147,7 +147,7 @@ _type_generate(const Eolian_Unit *src, const Eolian_Typedecl *tp,
147 /* Parameters */ 147 /* Parameters */
148 eina_strbuf_append(buf, "(void *data"); 148 eina_strbuf_append(buf, "(void *data");
149 int nidx = 1; 149 int nidx = 1;
150 eo_gen_params(eolian_function_parameters_get(fid), buf, NULL, &nidx, EOLIAN_FUNCTION_POINTER); 150 eo_gen_params(src, eolian_function_parameters_get(fid), buf, NULL, &nidx, EOLIAN_FUNCTION_POINTER);
151 eina_strbuf_append(buf, ")"); 151 eina_strbuf_append(buf, ")");
152 152
153 break; 153 break;
@@ -195,7 +195,7 @@ _var_generate(const Eolian_Unit *src, const Eolian_Variable *vr, Eina_Bool legac
195 } 195 }
196 else 196 else
197 { 197 {
198 Eina_Stringshare *ct = eolian_type_c_type_get(vt, EOLIAN_C_TYPE_DEFAULT); 198 Eina_Stringshare *ct = eolian_type_c_type_get(src, vt, EOLIAN_C_TYPE_DEFAULT);
199 eina_strbuf_append_printf(buf, "EWAPI extern %s %s;", ct, fn); 199 eina_strbuf_append_printf(buf, "EWAPI extern %s %s;", ct, fn);
200 eina_stringshare_del(ct); 200 eina_stringshare_del(ct);
201 } 201 }
@@ -285,7 +285,7 @@ void eo_gen_types_source_gen(const Eolian_Unit *src,
285 eina_str_toupper(&fn); 285 eina_str_toupper(&fn);
286 286
287 const Eolian_Type *vt = eolian_variable_base_type_get(vr); 287 const Eolian_Type *vt = eolian_variable_base_type_get(vr);
288 Eina_Stringshare *ct = eolian_type_c_type_get(vt, EOLIAN_C_TYPE_DEFAULT); 288 Eina_Stringshare *ct = eolian_type_c_type_get(src, vt, EOLIAN_C_TYPE_DEFAULT);
289 eina_strbuf_append_printf(buf, "EWAPI %s %s = ", ct, fn); 289 eina_strbuf_append_printf(buf, "EWAPI %s %s = ", ct, fn);
290 eina_stringshare_del(ct); 290 eina_stringshare_del(ct);
291 free(fn); 291 free(fn);