Try Jakub's casting with GPOINTER_TO_INT().

svn path=/trunk/; revision=28579
This commit is contained in:
Stig Bjørlykke 2009-06-01 21:47:45 +00:00
parent 29839540cf
commit 496e7909ba
1 changed files with 2 additions and 2 deletions

View File

@ -356,13 +356,13 @@ typedef struct nspr_pktracepart_v23
#define myoffsetof(type,fieldname) (&(((type*)0)->fieldname))
#define __TNO(enumprefix,structprefix,structname,hdrname,structfieldname) \
guint8 enumprefix##_##hdrname##_offset = (guint8)(guint)(void *)myoffsetof(nspr_##structname##_t,structprefix##_##structfieldname);
guint8 enumprefix##_##hdrname##_offset = (guint8)GPOINTER_TO_INT(myoffsetof(nspr_##structname##_t,structprefix##_##structfieldname));
#define __TNL(enumprefix,structprefix,structname,hdrname,structfieldname) \
guint8 enumprefix##_##hdrname##_len = (guint8)sizeof(((nspr_##structname##_t*)0)->structprefix##_##structfieldname);
#define __TNV1O(enumprefix,structprefix,structname,hdrname,structfieldname) \
guint8 enumprefix##_##hdrname##_offset = (guint8)(guint)(void *)myoffsetof(nspr_##structname##_t,structfieldname);
guint8 enumprefix##_##hdrname##_offset = (guint8)GPOINTER_TO_INT(myoffsetof(nspr_##structname##_t,structfieldname));
#define __TNV1L(enumprefix,structprefix,structname,hdrname,structfieldname) \
guint8 enumprefix##_##hdrname##_len = (guint8)sizeof(((nspr_##structname##_t*)0)->structfieldname);