summaryrefslogtreecommitdiff
path: root/src/bin/eolian/legacy_generator.c
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-20 16:39:00 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-20 16:39:17 +0100
commita22ac701b6b705d07327ace41e9a05398ff3a466 (patch)
treed8420f3c5167c065dd182f1a2ff1b08f73e8e7c2 /src/bin/eolian/legacy_generator.c
parent4dc0aba991f53088d7236c7f82ea2927a731bd17 (diff)
eolian: use eolian_property_values_get correctly
Diffstat (limited to '')
-rw-r--r--src/bin/eolian/legacy_generator.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/bin/eolian/legacy_generator.c b/src/bin/eolian/legacy_generator.c
index dc705bf4b1..20af6d5f0e 100644
--- a/src/bin/eolian/legacy_generator.c
+++ b/src/bin/eolian/legacy_generator.c
@@ -55,6 +55,7 @@ _eapi_decl_func_generate(const Eolian_Class *class, const Eolian_Function *funci
55 Eina_Bool var_as_ret = EINA_FALSE; 55 Eina_Bool var_as_ret = EINA_FALSE;
56 Eina_Bool add_star = EINA_FALSE; 56 Eina_Bool add_star = EINA_FALSE;
57 Eina_Bool ret_const = EINA_FALSE; 57 Eina_Bool ret_const = EINA_FALSE;
58 Eina_Bool is_prop = (ftype == EOLIAN_PROP_GET || ftype == EOLIAN_PROP_SET);
58 Eina_Iterator *itr; 59 Eina_Iterator *itr;
59 void *data, *data2; 60 void *data, *data2;
60 Eina_Strbuf *flags = NULL; 61 Eina_Strbuf *flags = NULL;
@@ -71,7 +72,7 @@ _eapi_decl_func_generate(const Eolian_Class *class, const Eolian_Function *funci
71 add_star = EINA_TRUE; 72 add_star = EINA_TRUE;
72 if (!rettypet) 73 if (!rettypet)
73 { 74 {
74 itr = eolian_function_parameters_get(funcid); 75 itr = eolian_property_values_get(funcid);
75 /* We want to check if there is only one parameter */ 76 /* We want to check if there is only one parameter */
76 if (eina_iterator_next(itr, &data) && !eina_iterator_next(itr, &data2)) 77 if (eina_iterator_next(itr, &data) && !eina_iterator_next(itr, &data2))
77 { 78 {
@@ -142,7 +143,7 @@ _eapi_decl_func_generate(const Eolian_Class *class, const Eolian_Function *funci
142 eina_iterator_free(itr); 143 eina_iterator_free(itr);
143 if (!var_as_ret) 144 if (!var_as_ret)
144 { 145 {
145 itr = eolian_function_parameters_get(funcid); 146 itr = is_prop ? eolian_property_values_get(funcid) : eolian_function_parameters_get(funcid);
146 EINA_ITERATOR_FOREACH(itr, data) 147 EINA_ITERATOR_FOREACH(itr, data)
147 { 148 {
148 Eolian_Function_Parameter *param = data; 149 Eolian_Function_Parameter *param = data;
@@ -222,6 +223,7 @@ _eapi_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eo
222 Eina_Bool ret_const = EINA_FALSE; 223 Eina_Bool ret_const = EINA_FALSE;
223 Eina_Bool add_star = EINA_FALSE; 224 Eina_Bool add_star = EINA_FALSE;
224 Eina_Bool ret_is_void = EINA_FALSE; 225 Eina_Bool ret_is_void = EINA_FALSE;
226 Eina_Bool is_prop = (ftype == EOLIAN_PROP_GET || ftype == EOLIAN_PROP_SET);
225 227
226 Eina_Strbuf *fbody = eina_strbuf_new(); 228 Eina_Strbuf *fbody = eina_strbuf_new();
227 Eina_Strbuf *fparam = eina_strbuf_new(); 229 Eina_Strbuf *fparam = eina_strbuf_new();
@@ -240,7 +242,7 @@ _eapi_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eo
240 add_star = EINA_TRUE; 242 add_star = EINA_TRUE;
241 if (!rettypet) 243 if (!rettypet)
242 { 244 {
243 itr = eolian_function_parameters_get(funcid); 245 itr = eolian_property_values_get(funcid);
244 /* We want to check if there is only one parameter */ 246 /* We want to check if there is only one parameter */
245 if (eina_iterator_next(itr, &data) && !eina_iterator_next(itr, &data2)) 247 if (eina_iterator_next(itr, &data) && !eina_iterator_next(itr, &data2))
246 { 248 {
@@ -302,7 +304,7 @@ _eapi_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eo
302 eina_iterator_free(itr); 304 eina_iterator_free(itr);
303 if (!var_as_ret) 305 if (!var_as_ret)
304 { 306 {
305 itr = eolian_function_parameters_get(funcid); 307 itr = is_prop ? eolian_property_values_get(funcid) : eolian_function_parameters_get(funcid);
306 EINA_ITERATOR_FOREACH(itr, data) 308 EINA_ITERATOR_FOREACH(itr, data)
307 { 309 {
308 Eolian_Function_Parameter *param = data; 310 Eolian_Function_Parameter *param = data;