Changeset 2 for trunk


Ignore:
Timestamp:
2006-05-13T03:51:59+02:00 (8 years ago)
Author:
moo
Message:

fix the using of XtOffsetOf?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xcache.h

    r1 r2  
    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.