summaryrefslogtreecommitdiff
path: root/src/bin/eolian/types.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/eolian/types.c')
-rw-r--r--src/bin/eolian/types.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/bin/eolian/types.c b/src/bin/eolian/types.c
index 9baebed02a..c856d7abba 100644
--- a/src/bin/eolian/types.c
+++ b/src/bin/eolian/types.c
@@ -42,7 +42,8 @@ _type_generate(const Eolian_Unit *src, const Eolian_Typedecl *tp,
42 Eina_Stringshare *ct = NULL; 42 Eina_Stringshare *ct = NULL;
43 if (eolian_type_type_get(mtp) == EOLIAN_TYPE_STATIC_ARRAY) 43 if (eolian_type_type_get(mtp) == EOLIAN_TYPE_STATIC_ARRAY)
44 { 44 {
45 ct = eolian_type_c_type_get(eolian_type_base_type_get(mtp)); 45 ct = eolian_type_c_type_get(eolian_type_base_type_get(mtp),
46 EOLIAN_C_TYPE_DEFAULT);
46 eina_strbuf_append_printf(buf, " %s%s%s[%zu];", 47 eina_strbuf_append_printf(buf, " %s%s%s[%zu];",
47 ct, strchr(ct, '*') ? "" : " ", 48 ct, strchr(ct, '*') ? "" : " ",
48 eolian_typedecl_struct_field_name_get(memb), 49 eolian_typedecl_struct_field_name_get(memb),
@@ -50,7 +51,7 @@ _type_generate(const Eolian_Unit *src, const Eolian_Typedecl *tp,
50 } 51 }
51 else 52 else
52 { 53 {
53 ct = eolian_type_c_type_get(mtp); 54 ct = eolian_type_c_type_get(mtp, EOLIAN_C_TYPE_DEFAULT);
54 eina_strbuf_append_printf(buf, " %s%s%s;", 55 eina_strbuf_append_printf(buf, " %s%s%s;",
55 ct, strchr(ct, '*') ? "" : " ", 56 ct, strchr(ct, '*') ? "" : " ",
56 eolian_typedecl_struct_field_name_get(memb)); 57 eolian_typedecl_struct_field_name_get(memb));
@@ -145,7 +146,7 @@ _type_generate(const Eolian_Unit *src, const Eolian_Typedecl *tp,
145 eina_strbuf_append(buf, "void "); 146 eina_strbuf_append(buf, "void ");
146 else 147 else
147 { 148 {
148 Eina_Stringshare *ct = eolian_type_c_type_get(rtp); 149 Eina_Stringshare *ct = eolian_type_c_type_get(rtp, EOLIAN_C_TYPE_RETURN);
149 eina_strbuf_append_printf(buf, "%s ", ct); 150 eina_strbuf_append_printf(buf, "%s ", ct);
150 } 151 }
151 152
@@ -162,7 +163,7 @@ _type_generate(const Eolian_Unit *src, const Eolian_Typedecl *tp,
162 { 163 {
163 const Eolian_Typedecl *ptd = eolian_type_typedecl_get(eolian_parameter_type_get(param)); 164 const Eolian_Typedecl *ptd = eolian_type_typedecl_get(eolian_parameter_type_get(param));
164 Eina_Stringshare *pn = eolian_parameter_name_get(param); 165 Eina_Stringshare *pn = eolian_parameter_name_get(param);
165 Eina_Stringshare *pt = eolian_type_c_type_get(eolian_parameter_type_get(param)); 166 Eina_Stringshare *pt = eolian_type_c_type_get(eolian_parameter_type_get(param), EOLIAN_C_TYPE_PARAM);
166 167
167 if (!pn) 168 if (!pn)
168 pn = ""; // FIXME add some kind of param1/param2 control for null? 169 pn = ""; // FIXME add some kind of param1/param2 control for null?
@@ -221,7 +222,7 @@ _var_generate(const Eolian_Unit *src, const Eolian_Variable *vr, Eina_Bool legac
221 } 222 }
222 else 223 else
223 { 224 {
224 Eina_Stringshare *ct = eolian_type_c_type_get(vt); 225 Eina_Stringshare *ct = eolian_type_c_type_get(vt, EOLIAN_C_TYPE_DEFAULT);
225 eina_strbuf_append_printf(buf, "EWAPI extern %s %s;", ct, fn); 226 eina_strbuf_append_printf(buf, "EWAPI extern %s %s;", ct, fn);
226 eina_stringshare_del(ct); 227 eina_stringshare_del(ct);
227 } 228 }
@@ -314,7 +315,7 @@ void eo_gen_types_source_gen(const Eolian_Unit *src,
314 eina_str_toupper(&fn); 315 eina_str_toupper(&fn);
315 316
316 const Eolian_Type *vt = eolian_variable_base_type_get(vr); 317 const Eolian_Type *vt = eolian_variable_base_type_get(vr);
317 Eina_Stringshare *ct = eolian_type_c_type_get(vt); 318 Eina_Stringshare *ct = eolian_type_c_type_get(vt, EOLIAN_C_TYPE_DEFAULT);
318 eina_strbuf_append_printf(buf, "EWAPI %s %s = ", ct, fn); 319 eina_strbuf_append_printf(buf, "EWAPI %s %s = ", ct, fn);
319 eina_stringshare_del(ct); 320 eina_stringshare_del(ct);
320 free(fn); 321 free(fn);