On Tue, Apr 12, 2011 at 11:27 AM, Vincent Torri <vto...@univ-evry.fr> wrote:
> 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
>
> you should add that test:
>
> #ifdef _WIN64
> typedef unsigned __int64 Eina_Object_ID;
> typedef unsigned short Eina_Object_Generation;  <--- I don't really know 
> which type, here

Just something that can hold 16 bits.

> #define EINA_GEN_OFFSET 48      <--- I don't really know which value, here

Well 48 + 16 == 64, that's the point of this code, to adjust to the
maximum available space. It's really not an issue if it fallback to 32
bits solution.

> #define EINA_ID_STR "%I64u"
> #endif
>
> %I64u is for unsigned __int64
>
> also, shouldn't you use %lu and %u instead of %li and %i ?

Maybe. It's just for debugging dramatic situation. I doubt it will be
really usefull anyway :-)
-- 
Cedric BAIL

------------------------------------------------------------------------------
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