summaryrefslogtreecommitdiff
path: root/src/bin/eolian/headers.c
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2018-01-16 16:36:45 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2018-01-16 16:39:05 +0100
commitd47610a7323dd357e57f26ca83014c7b39dd48e9 (patch)
treec218e79bd8519a7a567c68dd3386a2cffa94e340 /src/bin/eolian/headers.c
parentdd2e579fecbe6ec4d1e0e7d46c82daff39be03c5 (diff)
eolian: do not require unit when stringifying types
As it is no longer necessary to pass unit when evaluating exprs, it is not necessary to pass it here either. Convert all the APIs to the new style and update all instances in our tree.
Diffstat (limited to 'src/bin/eolian/headers.c')
-rw-r--r--src/bin/eolian/headers.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/bin/eolian/headers.c b/src/bin/eolian/headers.c
index 8ed0c8e..319dffd 100644
--- a/src/bin/eolian/headers.c
+++ b/src/bin/eolian/headers.c
@@ -12,13 +12,13 @@ _get_add_star(Eolian_Function_Type ftype, Eolian_Parameter_Dir pdir)
12} 12}
13 13
14static int 14static int
15_gen_param(const Eolian_Unit *src, Eina_Strbuf *buf, 15_gen_param(Eina_Strbuf *buf, Eolian_Function_Parameter *pr,
16 Eolian_Function_Parameter *pr, Eolian_Function_Type ftype, int *rpid) 16 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(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(prt, EOLIAN_C_TYPE_PARAM);
22 22
23 if (ptd && (eolian_typedecl_type_get(ptd) == EOLIAN_TYPEDECL_FUNCTION_POINTER)) 23 if (ptd && (eolian_typedecl_type_get(ptd) == EOLIAN_TYPEDECL_FUNCTION_POINTER))
24 { 24 {
@@ -40,7 +40,7 @@ _gen_param(const Eolian_Unit *src, Eina_Strbuf *buf,
40} 40}
41 41
42void 42void
43eo_gen_params(const Eolian_Unit *src, Eina_Iterator *itr, Eina_Strbuf *buf, 43eo_gen_params(Eina_Iterator *itr, Eina_Strbuf *buf,
44 Eina_Strbuf **flagbuf, int *nidx, Eolian_Function_Type ftype) 44 Eina_Strbuf **flagbuf, int *nidx, Eolian_Function_Type ftype)
45{ 45{
46 Eolian_Function_Parameter *pr; 46 Eolian_Function_Parameter *pr;
@@ -49,7 +49,7 @@ eo_gen_params(const Eolian_Unit *src, Eina_Iterator *itr, Eina_Strbuf *buf,
49 int rpid = 0; 49 int rpid = 0;
50 if (*nidx) 50 if (*nidx)
51 eina_strbuf_append(buf, ", "); 51 eina_strbuf_append(buf, ", ");
52 *nidx += _gen_param(src, buf, pr, ftype, &rpid); 52 *nidx += _gen_param(buf, pr, ftype, &rpid);
53 53
54 if (!eolian_parameter_is_nonull(pr) || !flagbuf) 54 if (!eolian_parameter_is_nonull(pr) || !flagbuf)
55 continue; 55 continue;
@@ -112,7 +112,7 @@ _gen_func(const Eolian_Unit *src, const Eolian_Function *fid,
112 eina_strbuf_append(buf, legacy ? "EAPI " : "EOAPI "); 112 eina_strbuf_append(buf, legacy ? "EAPI " : "EOAPI ");
113 if (rtp) 113 if (rtp)
114 { 114 {
115 Eina_Stringshare *rtps = eolian_type_c_type_get(src, rtp, EOLIAN_C_TYPE_RETURN); 115 Eina_Stringshare *rtps = eolian_type_c_type_get(rtp, EOLIAN_C_TYPE_RETURN);
116 eina_strbuf_append(buf, rtps); 116 eina_strbuf_append(buf, rtps);
117 if (rtps[strlen(rtps) - 1] != '*') 117 if (rtps[strlen(rtps) - 1] != '*')
118 eina_strbuf_append_char(buf, ' '); 118 eina_strbuf_append_char(buf, ' ');
@@ -141,7 +141,7 @@ _gen_func(const Eolian_Unit *src, const Eolian_Function *fid,
141 eina_strbuf_append(buf, "Eo *obj"); 141 eina_strbuf_append(buf, "Eo *obj");
142 } 142 }
143 143
144 eo_gen_params(src, eolian_property_keys_get(fid, ftype), buf, &flagbuf, &nidx, EOLIAN_PROPERTY); 144 eo_gen_params(eolian_property_keys_get(fid, ftype), buf, &flagbuf, &nidx, EOLIAN_PROPERTY);
145 145
146 if (!var_as_ret) 146 if (!var_as_ret)
147 { 147 {
@@ -150,7 +150,7 @@ _gen_func(const Eolian_Unit *src, const Eolian_Function *fid,
150 itr = eolian_property_values_get(fid, ftype); 150 itr = eolian_property_values_get(fid, ftype);
151 else 151 else
152 itr = eolian_function_parameters_get(fid); 152 itr = eolian_function_parameters_get(fid);
153 eo_gen_params(src, itr, buf, &flagbuf, &nidx, ftype); 153 eo_gen_params(itr, buf, &flagbuf, &nidx, ftype);
154 } 154 }
155 155
156 if (flagbuf) 156 if (flagbuf)