q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=c2b1e670b486da6c8e63970c558f2c390a7bda49

commit c2b1e670b486da6c8e63970c558f2c390a7bda49
Author: Daniel Kolesa <d.kol...@osg.samsung.com>
Date:   Mon Jul 6 11:25:32 2015 +0100

    eolian/generator: use the __eolian function in overrides when default 
values are present
---
 src/bin/eolian/eo_generator.c | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c
index d31a656..2be1fa7 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)
              _class_env_create(impl_class, NULL, &impl_env);
              funcname = eolian_function_name_get(fnid);
 
+             Eina_Bool dflt_values = EINA_FALSE;
+             Eina_Iterator *pitr = NULL;
+             if (!eolian_implement_is_auto(impl_desc) && fnid && (ftype != 
EOLIAN_PROP_SET))
+               {
+                  Eolian_Function_Parameter *param;
+                  pitr = (ftype == EOLIAN_METHOD) ? 
eolian_function_parameters_get(fnid)
+                                                  : 
eolian_property_values_get(fnid, ftype);
+                  EINA_ITERATOR_FOREACH(pitr, param)
+                    {
+                       const Eolian_Expression *dflt_value = 
eolian_parameter_default_value_get(param);
+                       if (dflt_value)
+                         {
+                            Eolian_Value val = eolian_expression_eval
+                               (dflt_value, EOLIAN_MASK_ALL);
+                            if (val.type)
+                              {
+                                 dflt_values = EINA_TRUE;
+                                 break;
+                              }
+                         }
+                    }
+                  eina_iterator_free(pitr);
+               }
+
              sprintf(implname, "%s_%s_%s",
-                   eolian_implement_is_auto(impl_desc) || 
eolian_implement_is_empty(impl_desc)?
+                   (eolian_implement_is_auto(impl_desc) || 
eolian_implement_is_empty(impl_desc) || dflt_values)?
                    "__eolian":"",
                    class_env.full_classname, impl_env.full_classname);
              eina_str_tolower(&tp);

-- 


Reply via email to