stefan pushed a commit to branch master.

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

commit 86f1e6a00c54a37515b1d3487ef3d9174dc36f38
Author: Vincent Torri <[email protected]>
Date:   Fri May 15 03:42:30 2020 +0000

    evas: gesture_manager: fix usage of long on Windows
    
    On Windows 64bits, long is a 4 bytes type. Declare count as being a 
intptr_t instead of long
    
    Reviewed-by: Stefan Schmidt <[email protected]>
    Differential Revision: https://phab.enlightenment.org/D11836
---
 src/lib/evas/gesture/efl_canvas_gesture_manager.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/evas/gesture/efl_canvas_gesture_manager.c 
b/src/lib/evas/gesture/efl_canvas_gesture_manager.c
index 4a1239637f..38071d40e8 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_manager.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_manager.c
@@ -206,7 +206,7 @@ _efl_canvas_gesture_manager_callback_add_hook(void *data, 
Eo *target, const Efl_
      {
         //Add it to the gesture context.
         Eina_Hash *thisisreallystupid = eina_hash_find(pd->m_gesture_contex, 
&target);
-        int count = 0;
+        intptr_t count = 0;
         /* already present */
         if (thisisreallystupid)
           count = (intptr_t)eina_hash_find(thisisreallystupid, &type);
@@ -216,7 +216,7 @@ _efl_canvas_gesture_manager_callback_add_hook(void *data, 
Eo *target, const Efl_
              eina_hash_set(pd->m_gesture_contex, &target, thisisreallystupid);
           }
         count++;
-        eina_hash_set(thisisreallystupid, &type, (intptr_t*)(long)count);
+        eina_hash_set(thisisreallystupid, &type, (intptr_t*)count);
      }
 }
 
@@ -234,13 +234,13 @@ _efl_canvas_gesture_manager_callback_del_hook(void *data, 
Eo *target, const Efl_
    if (recognizer)
      {
         Eina_Hash *thisisreallystupid = eina_hash_find(pd->m_gesture_contex, 
&target);
-        int count;
+        intptr_t count;
 
         if (!thisisreallystupid) return;
         count = (intptr_t)eina_hash_find(thisisreallystupid, &type);
         if (!count) return;
         count--;
-        eina_hash_set(thisisreallystupid, &type, (intptr_t*)(long)count);
+        eina_hash_set(thisisreallystupid, &type, (intptr_t*)count);
         if (count) return;
         eina_hash_del_by_key(thisisreallystupid, &type);
         if (eina_hash_population(thisisreallystupid)) return;

-- 


Reply via email to