summaryrefslogtreecommitdiff
path: root/src/bin/eolian/eo_generator.c
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-07-06 11:25:32 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-07-06 11:25:32 +0100
commitc2b1e670b486da6c8e63970c558f2c390a7bda49 (patch)
treedfa6d4e50c6f8ba99b80ac9e27db7199ad244722 /src/bin/eolian/eo_generator.c
parentc0731cdd51849ac2d8d0da811c0e1b1733eedfd2 (diff)
eolian/generator: use the __eolian function in overrides when default values are present
Diffstat (limited to '')
-rw-r--r--src/bin/eolian/eo_generator.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c
index d31a656a80..2be1fa7ffe 100644
--- a/src/bin/eolian/eo_generator.c
+++ b/src/bin/eolian/eo_generator.c
@@ -834,8 +834,32 @@ eo_source_end_generate(const Eolian_Class *class, Eina_Strbuf *buf)
834 _class_env_create(impl_class, NULL, &impl_env); 834 _class_env_create(impl_class, NULL, &impl_env);
835 funcname = eolian_function_name_get(fnid); 835 funcname = eolian_function_name_get(fnid);
836 836
837 Eina_Bool dflt_values = EINA_FALSE;
838 Eina_Iterator *pitr = NULL;
839 if (!eolian_implement_is_auto(impl_desc) && fnid && (ftype != EOLIAN_PROP_SET))
840 {
841 Eolian_Function_Parameter *param;
842 pitr = (ftype == EOLIAN_METHOD) ? eolian_function_parameters_get(fnid)
843 : eolian_property_values_get(fnid, ftype);
844 EINA_ITERATOR_FOREACH(pitr, param)
845 {
846 const Eolian_Expression *dflt_value = eolian_parameter_default_value_get(param);
847 if (dflt_value)
848 {
849 Eolian_Value val = eolian_expression_eval
850 (dflt_value, EOLIAN_MASK_ALL);
851 if (val.type)
852 {
853 dflt_values = EINA_TRUE;
854 break;
855 }
856 }
857 }
858 eina_iterator_free(pitr);
859 }
860
837 sprintf(implname, "%s_%s_%s", 861 sprintf(implname, "%s_%s_%s",
838 eolian_implement_is_auto(impl_desc) || eolian_implement_is_empty(impl_desc)? 862 (eolian_implement_is_auto(impl_desc) || eolian_implement_is_empty(impl_desc) || dflt_values)?
839 "__eolian":"", 863 "__eolian":"",
840 class_env.full_classname, impl_env.full_classname); 864 class_env.full_classname, impl_env.full_classname);
841 eina_str_tolower(&tp); 865 eina_str_tolower(&tp);