On Tue, 12 Apr 2011, Enlightenment SVN wrote:

> Log:
> eina: fix 64bits warning.
>
>
> Author:       cedric
> Date:         2011-04-12 02:00:45 -0700 (Tue, 12 Apr 2011)
> New Revision: 58583
> Trac:         http://trac.enlightenment.org/e/changeset/58583
>
> Modified:
>  trunk/eina/src/lib/eina_object.c
>
> Modified: trunk/eina/src/lib/eina_object.c
> ===================================================================
> --- trunk/eina/src/lib/eina_object.c  2011-04-12 08:52:59 UTC (rev 58582)
> +++ trunk/eina/src/lib/eina_object.c  2011-04-12 09:00:45 UTC (rev 58583)
> @@ -65,10 +65,12 @@
> typedef unsigned long Eina_Object_ID;
> typedef unsigned short Eina_Object_Generation;
> #define EINA_GEN_OFFSET 48
> +#define EINA_ID_STR "%li"
> #else
> typedef unsigned int Eina_Object_ID;
> typedef unsigned char Eina_Object_Generation;
> #define EINA_GEN_OFFSET 24
> +#define EINA_ID_STR "%i"
> #endif

OMG, i'll have plenty of win32/win64 changes :(

Vincent

>
> typedef struct _Eina_Class_Range Eina_Class_Range;
> @@ -252,7 +254,7 @@
>
>   gen = item->range->generation_array[item->index];
>
> -  id = (gen << EINA_GEN_OFFSET) + item->range->start + item->index;
> +  id = ((Eina_Object_ID) gen << EINA_GEN_OFFSET) + item->range->start + 
> item->index;
>
>   return (Eina_Object *) id;
> }
> @@ -266,11 +268,11 @@
>   Eina_Rbtree *match;
>   Eina_Object_Generation generation;
>   Eina_Object_ID id;
> -  int idx;
> +  Eina_Object_ID idx;
>
>   id = (Eina_Object_ID) object;
> -  idx = id & ((1 << EINA_GEN_OFFSET) - 1);
> -  generation = id & !((1 << EINA_GEN_OFFSET) - 1);
> +  idx = id & (((Eina_Object_ID) 1 << EINA_GEN_OFFSET) - 1);
> +  generation = id & !(((Eina_Object_ID) 1 << EINA_GEN_OFFSET) - 1);
>
>   /* Try to find the ID */
>   match = eina_rbtree_inline_lookup(class->top->range,
> @@ -279,7 +281,7 @@
>   /* ID not found, invalid pointer ! */
>   if (!match)
>     {
> -      ERR("%p: ID [%i] not found in class hiearchy of [%s].",
> +      ERR("%p: ID ["EINA_ID_STR"] not found in class hiearchy of [%s].",
>         object, idx, class->name);
>       return NULL;
>     }
>
>
> ------------------------------------------------------------------------------
> Forrester Wave Report - Recovery time is now measured in hours and minutes
> not days. Key insights are discussed in the 2010 Forrester Wave Report as
> part of an in-depth evaluation of disaster recovery service providers.
> Forrester found the best-in-class provider in terms of services and vision.
> Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
> _______________________________________________
> enlightenment-svn mailing list
> enlightenment-...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>
>

------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to