diff --git a/source/libs/tdb/src/inc/tdbPage.h b/source/libs/tdb/src/inc/tdbPage.h index e85660ab33cf0414708c8586a9f45ebd26de807e..be412e635c93fd1f4627132b75de011a3b757995 100644 --- a/source/libs/tdb/src/inc/tdbPage.h +++ b/source/libs/tdb/src/inc/tdbPage.h @@ -31,7 +31,7 @@ typedef struct __attribute__((__packed__)) { struct SPage { pthread_spinlock_t lock; - void *pData; + u8 *pData; SPgid pgid; // Fields used by SPCache @@ -49,6 +49,10 @@ struct SPage { int aiOvfl[4]; }; +// Macros +#define TDB_PAGE_CELL_IDX_AT(pPage, idx) ((pPage)->aCellIdx[idx]) +#define TDB_PAGE_CELL_AT(pPage, idx) ((pPage)->pData + TDB_PAGE_CELL_IDX_AT(pPage, idx)) + // For page lock #define P_LOCK_SUCC 0 #define P_LOCK_BUSY 1