Browse Source

fix the using of XtOffsetOf

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@2 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
1.1
Xuefer 15 years ago
parent
commit
f6055f2851
  1. 6
      xcache.h

6
xcache.h

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

Loading…
Cancel
Save