examples: fix pointer <-> int conversion (windows 64 bits) in ecore and evas examples.

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
This commit is contained in:
Vincent Torri 2014-01-09 09:08:38 +01:00 committed by Cedric BAIL
parent 9725e5f8c4
commit 4af198b6da
3 changed files with 16 additions and 16 deletions

View File

@ -99,7 +99,7 @@ _feedback_job(void *data EINA_UNUSED, Ecore_Thread *th)
#endif
App_Msg *msg;
count = (int)ecore_thread_global_data_find("count");
count = (int)(uintptr_t)ecore_thread_global_data_find("count");
for (i = 0; i < count; i++)
{
char buf[32];
@ -369,7 +369,7 @@ main(int argc, char *argv[])
Feedback_Thread_Data *ftd;
char *str;
ecore_thread_global_data_add("count",
(void *)eina_list_count(path_list), NULL,
(void *)(uintptr_t)eina_list_count(path_list), NULL,
EINA_FALSE);
i = 0;
EINA_LIST_FREE(path_list, str)

View File

@ -206,7 +206,7 @@ _on_child_del(void *data,
EVAS_SMART_EXAMPLE_DATA_GET(example_smart, priv);
idx = (long)evas_object_data_get(o, "index");
idx = (long)(uintptr_t)evas_object_data_get(o, "index");
idx--;
priv->children[idx] = NULL;
@ -228,7 +228,7 @@ _evas_smart_example_child_callbacks_register(Evas_Object *o,
long idx)
{
evas_object_event_callback_add(child, EVAS_CALLBACK_FREE, _on_child_del, o);
evas_object_data_set(child, "index", (void *)(++idx));
evas_object_data_set(child, "index", (void *)(uintptr_t)(++idx));
}
/* create and setup a new example smart object's internals */
@ -381,13 +381,13 @@ evas_smart_example_remove(Evas_Object *o,
return NULL;
}
idx = (long)evas_object_data_get(child, "index");
idx = (long)(uintptr_t)evas_object_data_get(child, "index");
idx--;
_evas_smart_example_remove_do(priv, child, idx);
evas_object_smart_callback_call(
o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(long)priv->child_count);
o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(uintptr_t)priv->child_count);
evas_object_smart_changed(o);
return child;
@ -431,7 +431,7 @@ evas_smart_example_set_left(Evas_Object *o,
if (!ret)
{
evas_object_smart_callback_call(
o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(long)priv->child_count);
o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(uintptr_t)priv->child_count);
}
return ret;
@ -475,7 +475,7 @@ evas_smart_example_set_right(Evas_Object *o,
if (!ret)
{
evas_object_smart_callback_call(
o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(long)priv->child_count);
o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(uintptr_t)priv->child_count);
}
return ret;
@ -667,7 +667,7 @@ _on_example_smart_object_child_num_change(void *data EINA_UNUSED,
void *event_info)
{
fprintf(stdout, "Number of child members on our example smart"
" object changed to %lu\n", (long)event_info);
" object changed to %llu\n", (unsigned long long)event_info);
}
int

View File

@ -165,7 +165,7 @@ _on_child_del(void *data,
EVAS_SMART_EXAMPLE_DATA_GET(example_smart, priv);
idx = (long)evas_object_data_get(o, "index");
idx = (long)(uintptr_t)evas_object_data_get(o, "index");
idx--;
priv->children[idx] = NULL;
@ -187,7 +187,7 @@ _evas_smart_example_child_callbacks_register(Evas_Object *o,
long idx)
{
evas_object_event_callback_add(child, EVAS_CALLBACK_FREE, _on_child_del, o);
evas_object_data_set(child, "index", (void *)(++idx));
evas_object_data_set(child, "index", (void *)(uintptr_t)(++idx));
}
/* create and setup a new example smart object's internals */
@ -318,13 +318,13 @@ evas_smart_example_remove(Evas_Object *o,
return NULL;
}
idx = (long)evas_object_data_get(child, "index");
idx = (long)(uintptr_t)evas_object_data_get(child, "index");
idx--;
_evas_smart_example_remove_do(priv, child, idx);
evas_object_smart_callback_call(
o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(long)priv->child_count);
o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(uintptr_t)priv->child_count);
evas_object_smart_changed(o);
return child;
@ -368,7 +368,7 @@ evas_smart_example_set_left(Evas_Object *o,
if (!ret)
{
evas_object_smart_callback_call(
o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(long)priv->child_count);
o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(uintptr_t)priv->child_count);
}
return ret;
@ -412,7 +412,7 @@ evas_smart_example_set_right(Evas_Object *o,
if (!ret)
{
evas_object_smart_callback_call(
o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(long)priv->child_count);
o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(uintptr_t)priv->child_count);
}
return ret;
@ -639,7 +639,7 @@ _on_example_smart_object_child_num_change(void *data EINA_UNUSED,
void *event_info)
{
fprintf(stdout, "Number of child members on our example smart"
" object changed to %lu\n", (long)event_info);
" object changed to %llu\n", (unsigned long long)event_info);
}
int