1
0
Fork 0

fix the using of XtOffsetOf

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@2 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
1.1
Xuefer 2006-05-13 01:51:59 +00:00
parent 4389208e02
commit f6055f2851
1 changed files with 5 additions and 1 deletions

View File

@ -50,7 +50,11 @@
#define BUCKET_KEY(b) (UNISW((b)->arKey, (b)->key.u.string))
#define BUCKET_UKEY(b) (UNISW((b)->arKey, (b)->key.u.unicode))
#define BUCKET_KEY_TYPE(b) (UNISW(0, (b)->key.type))
#define BUCKET_HEAD_SIZE(b) XtOffsetOf(UNISW(sizeof((b)->arKey), sizeof((b)->key.u)))
#ifdef IS_UNICODE
# define BUCKET_HEAD_SIZE(b) XtOffsetOf(typeof(b[0]), key)
#else
# define BUCKET_HEAD_SIZE(b) XtOffsetOf(typeof(b[0]), arKey)
#endif
#define BUCKET_SIZE(b) (BUCKET_HEAD_SIZE(b) + BUCKET_KEY_SIZE(b))
#ifndef IS_UNICODE