Changeset f6055f2 in git


Ignore:
Timestamp:
2006-05-13T01:51:59Z (14 years ago)
Author:
Xuefer <xuefer@…>
Branches:
1.0, 1.1, 1.2, 1.3, 3.0, 3.1, 3.2, master, trunk
Children:
4fd29bd
Parents:
4389208
Message:

fix the using of XtOffsetOf?

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@2 c26eb9a1-5813-0410-bd6c-c2e55f420ca7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • xcache.h

    r4389208 rf6055f2  
    5151#define BUCKET_UKEY(b) (UNISW((b)->arKey, (b)->key.u.unicode))
    5252#define BUCKET_KEY_TYPE(b) (UNISW(0, (b)->key.type))
    53 #define BUCKET_HEAD_SIZE(b) XtOffsetOf(UNISW(sizeof((b)->arKey), sizeof((b)->key.u)))
     53#ifdef IS_UNICODE
     54#   define BUCKET_HEAD_SIZE(b) XtOffsetOf(typeof(b[0]), key)
     55#else
     56#   define BUCKET_HEAD_SIZE(b) XtOffsetOf(typeof(b[0]), arKey)
     57#endif
    5458#define BUCKET_SIZE(b) (BUCKET_HEAD_SIZE(b) + BUCKET_KEY_SIZE(b))
    5559
Note: See TracChangeset for help on using the changeset viewer.