examples: use a proper casting for 64 bit system by uintptr_t.

This commit is contained in:
Daniel Juyung Seo 2014-07-10 00:45:47 +09:00
parent 32c3bf41b5
commit e39781d834
2 changed files with 3 additions and 3 deletions

View File

@ -108,7 +108,7 @@ anim(void *data)
// just calculate some position using the pointer value of the object as // just calculate some position using the pointer value of the object as
// a seed value to make different objects go into different places over time // a seed value to make different objects go into different places over time
v = ((int)o) & 0xff; v = ((int)(uintptr_t)o) & 0xff;
t = ecore_loop_time_get(); t = ecore_loop_time_get();
w = 100 + ((v * 100) >> 8); w = 100 + ((v * 100) >> 8);
h = 100 + ((v * 100) >> 8); h = 100 + ((v * 100) >> 8);

View File

@ -37,7 +37,7 @@ _grid_label_get(void *data,
Evas_Object *obj, Evas_Object *obj,
const char *part) const char *part)
{ {
int idx = (int)data; int idx = (int)(uintptr_t)data;
return strdup(items[idx]); return strdup(items[idx]);
} }
@ -117,7 +117,7 @@ elm_main(int argc,
{ {
char buf[32]; char buf[32];
gg_it = elm_gengrid_item_append(grid, &gic, (void *)i, NULL, NULL); gg_it = elm_gengrid_item_append(grid, &gic, (void *)(uintptr_t)i, NULL, NULL);
/* indexing by first letters */ /* indexing by first letters */
snprintf(buf, sizeof(buf), "%c", items[i][0]); snprintf(buf, sizeof(buf), "%c", items[i][0]);