Eina: eina_object: Fix integer size on Windows 64 bits
authorVincent Torri <vincent.torri@gmail.com>
Fri, 22 Apr 2011 05:36:44 +0000 (05:36 +0000)
committerVincent Torri <vincent.torri@gmail.com>
Fri, 22 Apr 2011 05:36:44 +0000 (05:36 +0000)
 * use unsigned __int64 on Windows 64 bits
 * use unsigned modifier 'u' to print objects id

SVN revision: 58820

legacy/eina/src/lib/eina_object.c

index 0a6fa95..3334f2e 100644 (file)
 #ifdef _LP64
 typedef unsigned long Eina_Object_ID;
 typedef unsigned short Eina_Object_Generation;
-#define EINA_GEN_OFFSET 48
-#define EINA_ID_STR "%li"
+# define EINA_GEN_OFFSET 48
+# define EINA_ID_STR "%lu"
+#elif _WIN64
+typedef unsigned __int64 Eina_Object_ID;
+typedef unsigned short Eina_Object_Generation;
+# define EINA_GEN_OFFSET 48
+# define EINA_ID_STR "%I64u"
 #else
 typedef unsigned int Eina_Object_ID;
 typedef unsigned char Eina_Object_Generation;
-#define EINA_GEN_OFFSET 24
-#define EINA_ID_STR "%i"
+# define EINA_GEN_OFFSET 24
+# define EINA_ID_STR "%u"
 #endif
 
 typedef struct _Eina_Class_Range Eina_Class_Range;