jackdanielz pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=d2cc463ccc31f0061d4d144279d9968de6dfb030

commit d2cc463ccc31f0061d4d144279d9968de6dfb030
Author: Daniel Zaoui <daniel.za...@samsung.com>
Date:   Thu Apr 28 07:25:12 2016 +0300

    Fix ffi invocation when no return value is expected
---
 src/lib/ffi_abstraction.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/lib/ffi_abstraction.c b/src/lib/ffi_abstraction.c
index c393b4a..79de97c 100644
--- a/src/lib/ffi_abstraction.c
+++ b/src/lib/ffi_abstraction.c
@@ -283,13 +283,14 @@ _ffi_eo_do_get(const Gui_Session *session, const 
Gui_Widget *wdg, const Gui_Widg
         /* Check if arg_num == 2, t.e. 1 for Eo object and one for parameter.
          * In this case result will be returned as return value,
          * so write it into first parameter. */
-        void *ret_value = NULL;
+        intptr_t ret_value = 0;
+        ffi_call(&cif, (void (*)()) func_pointer, &ret_value, values);
         if (arg_num == 2)
           {
              Gui_Value *val = prop_value_nth_get(prop, 0);
-             ret_value = gui_value_pointer_get(val);
+             void *retp = gui_value_pointer_get(val);
+             *(intptr_t *)retp = ret_value;
           }
-        ffi_call(&cif, (void (*)()) func_pointer, ret_value, values);
         ret = EINA_TRUE;
      }
 

-- 


Reply via email to