summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2014-01-09 09:08:38 +0100
committerCedric BAIL <cedric.bail@samsung.com>2014-01-10 16:36:39 +0900
commitc3d5ff925243d9287bf81038985102d59ac0419a (patch)
treeeed58b4012b7e0c7f7eac810217d25ea4eb3c2e8 /src/examples
parent3f3f652535c156eb486b69c2d5f05e64d259389d (diff)
examples: fix pointer <-> int conversion (windows 64 bits) in ecore and evas examples.
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/ecore/ecore_thread_example.c4
-rw-r--r--src/examples/evas/evas-smart-interface.c14
-rw-r--r--src/examples/evas/evas-smart-object.c14
3 files changed, 16 insertions, 16 deletions
diff --git a/src/examples/ecore/ecore_thread_example.c b/src/examples/ecore/ecore_thread_example.c
index ad7b018c59..0c7f7309e4 100644
--- a/src/examples/ecore/ecore_thread_example.c
+++ b/src/examples/ecore/ecore_thread_example.c
@@ -99,7 +99,7 @@ _feedback_job(void *data EINA_UNUSED, Ecore_Thread *th)
99#endif 99#endif
100 App_Msg *msg; 100 App_Msg *msg;
101 101
102 count = (int)ecore_thread_global_data_find("count"); 102 count = (int)(uintptr_t)ecore_thread_global_data_find("count");
103 for (i = 0; i < count; i++) 103 for (i = 0; i < count; i++)
104 { 104 {
105 char buf[32]; 105 char buf[32];
@@ -369,7 +369,7 @@ main(int argc, char *argv[])
369 Feedback_Thread_Data *ftd; 369 Feedback_Thread_Data *ftd;
370 char *str; 370 char *str;
371 ecore_thread_global_data_add("count", 371 ecore_thread_global_data_add("count",
372 (void *)eina_list_count(path_list), NULL, 372 (void *)(uintptr_t)eina_list_count(path_list), NULL,
373 EINA_FALSE); 373 EINA_FALSE);
374 i = 0; 374 i = 0;
375 EINA_LIST_FREE(path_list, str) 375 EINA_LIST_FREE(path_list, str)
diff --git a/src/examples/evas/evas-smart-interface.c b/src/examples/evas/evas-smart-interface.c
index 39b4021ffc..2f6d862006 100644
--- a/src/examples/evas/evas-smart-interface.c
+++ b/src/examples/evas/evas-smart-interface.c
@@ -206,7 +206,7 @@ _on_child_del(void *data,
206 206
207 EVAS_SMART_EXAMPLE_DATA_GET(example_smart, priv); 207 EVAS_SMART_EXAMPLE_DATA_GET(example_smart, priv);
208 208
209 idx = (long)evas_object_data_get(o, "index"); 209 idx = (long)(uintptr_t)evas_object_data_get(o, "index");
210 idx--; 210 idx--;
211 211
212 priv->children[idx] = NULL; 212 priv->children[idx] = NULL;
@@ -228,7 +228,7 @@ _evas_smart_example_child_callbacks_register(Evas_Object *o,
228 long idx) 228 long idx)
229{ 229{
230 evas_object_event_callback_add(child, EVAS_CALLBACK_FREE, _on_child_del, o); 230 evas_object_event_callback_add(child, EVAS_CALLBACK_FREE, _on_child_del, o);
231 evas_object_data_set(child, "index", (void *)(++idx)); 231 evas_object_data_set(child, "index", (void *)(uintptr_t)(++idx));
232} 232}
233 233
234/* create and setup a new example smart object's internals */ 234/* create and setup a new example smart object's internals */
@@ -381,13 +381,13 @@ evas_smart_example_remove(Evas_Object *o,
381 return NULL; 381 return NULL;
382 } 382 }
383 383
384 idx = (long)evas_object_data_get(child, "index"); 384 idx = (long)(uintptr_t)evas_object_data_get(child, "index");
385 idx--; 385 idx--;
386 386
387 _evas_smart_example_remove_do(priv, child, idx); 387 _evas_smart_example_remove_do(priv, child, idx);
388 388
389 evas_object_smart_callback_call( 389 evas_object_smart_callback_call(
390 o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(long)priv->child_count); 390 o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(uintptr_t)priv->child_count);
391 evas_object_smart_changed(o); 391 evas_object_smart_changed(o);
392 392
393 return child; 393 return child;
@@ -431,7 +431,7 @@ evas_smart_example_set_left(Evas_Object *o,
431 if (!ret) 431 if (!ret)
432 { 432 {
433 evas_object_smart_callback_call( 433 evas_object_smart_callback_call(
434 o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(long)priv->child_count); 434 o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(uintptr_t)priv->child_count);
435 } 435 }
436 436
437 return ret; 437 return ret;
@@ -475,7 +475,7 @@ evas_smart_example_set_right(Evas_Object *o,
475 if (!ret) 475 if (!ret)
476 { 476 {
477 evas_object_smart_callback_call( 477 evas_object_smart_callback_call(
478 o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(long)priv->child_count); 478 o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(uintptr_t)priv->child_count);
479 } 479 }
480 480
481 return ret; 481 return ret;
@@ -667,7 +667,7 @@ _on_example_smart_object_child_num_change(void *data EINA_UNUSED,
667 void *event_info) 667 void *event_info)
668{ 668{
669 fprintf(stdout, "Number of child members on our example smart" 669 fprintf(stdout, "Number of child members on our example smart"
670 " object changed to %lu\n", (long)event_info); 670 " object changed to %llu\n", (unsigned long long)event_info);
671} 671}
672 672
673int 673int
diff --git a/src/examples/evas/evas-smart-object.c b/src/examples/evas/evas-smart-object.c
index c21bfc2a41..0a2a63f8fb 100644
--- a/src/examples/evas/evas-smart-object.c
+++ b/src/examples/evas/evas-smart-object.c
@@ -165,7 +165,7 @@ _on_child_del(void *data,
165 165
166 EVAS_SMART_EXAMPLE_DATA_GET(example_smart, priv); 166 EVAS_SMART_EXAMPLE_DATA_GET(example_smart, priv);
167 167
168 idx = (long)evas_object_data_get(o, "index"); 168 idx = (long)(uintptr_t)evas_object_data_get(o, "index");
169 idx--; 169 idx--;
170 170
171 priv->children[idx] = NULL; 171 priv->children[idx] = NULL;
@@ -187,7 +187,7 @@ _evas_smart_example_child_callbacks_register(Evas_Object *o,
187 long idx) 187 long idx)
188{ 188{
189 evas_object_event_callback_add(child, EVAS_CALLBACK_FREE, _on_child_del, o); 189 evas_object_event_callback_add(child, EVAS_CALLBACK_FREE, _on_child_del, o);
190 evas_object_data_set(child, "index", (void *)(++idx)); 190 evas_object_data_set(child, "index", (void *)(uintptr_t)(++idx));
191} 191}
192 192
193/* create and setup a new example smart object's internals */ 193/* create and setup a new example smart object's internals */
@@ -318,13 +318,13 @@ evas_smart_example_remove(Evas_Object *o,
318 return NULL; 318 return NULL;
319 } 319 }
320 320
321 idx = (long)evas_object_data_get(child, "index"); 321 idx = (long)(uintptr_t)evas_object_data_get(child, "index");
322 idx--; 322 idx--;
323 323
324 _evas_smart_example_remove_do(priv, child, idx); 324 _evas_smart_example_remove_do(priv, child, idx);
325 325
326 evas_object_smart_callback_call( 326 evas_object_smart_callback_call(
327 o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(long)priv->child_count); 327 o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(uintptr_t)priv->child_count);
328 evas_object_smart_changed(o); 328 evas_object_smart_changed(o);
329 329
330 return child; 330 return child;
@@ -368,7 +368,7 @@ evas_smart_example_set_left(Evas_Object *o,
368 if (!ret) 368 if (!ret)
369 { 369 {
370 evas_object_smart_callback_call( 370 evas_object_smart_callback_call(
371 o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(long)priv->child_count); 371 o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(uintptr_t)priv->child_count);
372 } 372 }
373 373
374 return ret; 374 return ret;
@@ -412,7 +412,7 @@ evas_smart_example_set_right(Evas_Object *o,
412 if (!ret) 412 if (!ret)
413 { 413 {
414 evas_object_smart_callback_call( 414 evas_object_smart_callback_call(
415 o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(long)priv->child_count); 415 o, EVT_CHILDREN_NUMBER_CHANGED, (void *)(uintptr_t)priv->child_count);
416 } 416 }
417 417
418 return ret; 418 return ret;
@@ -639,7 +639,7 @@ _on_example_smart_object_child_num_change(void *data EINA_UNUSED,
639 void *event_info) 639 void *event_info)
640{ 640{
641 fprintf(stdout, "Number of child members on our example smart" 641 fprintf(stdout, "Number of child members on our example smart"
642 " object changed to %lu\n", (long)event_info); 642 " object changed to %llu\n", (unsigned long long)event_info);
643} 643}
644 644
645int 645int