q66 pushed a commit to branch master.

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

commit bd21080c8224f001742251e93c7ebd65d1c8224a
Author: Daniel Kolesa <d.kol...@osg.samsung.com>
Date:   Mon Jan 2 15:00:38 2017 +0100

    eolian: no need to fill func in eolian_implement_function_get
    
    All implements are now filled in the previous stage.
---
 src/lib/eolian/database_implement_api.c | 53 +++++++--------------------------
 1 file changed, 11 insertions(+), 42 deletions(-)

diff --git a/src/lib/eolian/database_implement_api.c 
b/src/lib/eolian/database_implement_api.c
index 172e678..dfaa686 100644
--- a/src/lib/eolian/database_implement_api.c
+++ b/src/lib/eolian/database_implement_api.c
@@ -26,53 +26,22 @@ eolian_implement_function_get(const Eolian_Implement *impl,
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(impl, NULL);
 
-   if (impl->foo_id)
-     {
-        if (!func_type)
-          return impl->foo_id;
+   if (!impl->foo_id)
+     return NULL; /* normally unreachable */
 
-        if (impl->is_prop_get && impl->is_prop_set)
-          *func_type = EOLIAN_PROPERTY;
-        else if (impl->is_prop_get)
-          *func_type = EOLIAN_PROP_GET;
-        else if (impl->is_prop_set)
-          *func_type = EOLIAN_PROP_SET;
-        else
-          *func_type = eolian_function_type_get(impl->foo_id);
-
-        return impl->foo_id;
-     }
-
-   const Eolian_Class *klass = eolian_implement_class_get(impl);
-   if (!klass)
-     return NULL;
-
-   const char *func_name = impl->full_name + strlen(klass->full_name) + 1;
-
-   Eolian_Function_Type tp = EOLIAN_UNRESOLVED;
+   if (!func_type)
+     return impl->foo_id;
 
    if (impl->is_prop_get && impl->is_prop_set)
-     tp = EOLIAN_PROPERTY;
-   if (impl->is_prop_get)
-     tp = EOLIAN_PROP_GET;
+     *func_type = EOLIAN_PROPERTY;
+   else if (impl->is_prop_get)
+     *func_type = EOLIAN_PROP_GET;
    else if (impl->is_prop_set)
-     tp = EOLIAN_PROP_SET;
-
-   const Eolian_Function *fid = eolian_class_function_get_by_name(klass,
-                                                                  func_name,
-                                                                  tp);
-
-   if (func_type)
-     {
-        if (tp == EOLIAN_UNRESOLVED)
-          *func_type = eolian_function_type_get(fid);
-        else
-          *func_type = tp;
-     }
-
-   ((Eolian_Implement*)impl)->foo_id = fid;
+     *func_type = EOLIAN_PROP_SET;
+   else
+     *func_type = eolian_function_type_get(impl->foo_id);
 
-   return fid;
+   return impl->foo_id;
 }
 
 EAPI Eina_Bool

-- 


Reply via email to