seoz pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=e1a11daa8f08d051e8b7c781806eaa9f97358b98

commit e1a11daa8f08d051e8b7c781806eaa9f97358b98
Author: Daniel Juyung Seo <[email protected]>
Date:   Thu Jul 10 00:45:47 2014 +0900

    examples: use a proper casting for 64 bit system by uintptr_t.
---
 src/examples/efl_thread_6.c     | 2 +-
 src/examples/index_example_02.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/examples/efl_thread_6.c b/src/examples/efl_thread_6.c
index d5689d8..1f712a5 100644
--- a/src/examples/efl_thread_6.c
+++ b/src/examples/efl_thread_6.c
@@ -108,7 +108,7 @@ anim(void *data)
 
    // 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
-   v = ((int)o) & 0xff;
+   v = ((int)(uintptr_t)o) & 0xff;
    t = ecore_loop_time_get();
    w = 100 + ((v * 100) >> 8);
    h = 100 + ((v * 100) >> 8);
diff --git a/src/examples/index_example_02.c b/src/examples/index_example_02.c
index 3c87554..cbc6047 100644
--- a/src/examples/index_example_02.c
+++ b/src/examples/index_example_02.c
@@ -37,7 +37,7 @@ _grid_label_get(void        *data,
                 Evas_Object *obj,
                 const char  *part)
 {
-   int idx = (int)data;
+   int idx = (int)(uintptr_t)data;
    return strdup(items[idx]);
 }
 
@@ -117,7 +117,7 @@ elm_main(int    argc,
      {
         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 */
         snprintf(buf, sizeof(buf), "%c", items[i][0]);

-- 


Reply via email to