From 86f1e6a00c54a37515b1d3487ef3d9174dc36f38 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Fri, 15 May 2020 03:42:30 +0000 Subject: [PATCH] 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 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;