This commit is contained in:
Hongze Cheng 2022-03-18 09:45:59 +00:00
parent 465dac8234
commit df1caa7062
1 changed files with 8 additions and 8 deletions

View File

@ -15,14 +15,6 @@
#include "tdbInt.h"
typedef struct __attribute__((__packed__)) {
u16 flags;
u16 cellNum;
u16 cellBody;
u16 cellFree;
u16 nFree;
} SPageHdr;
extern SPageMethods pageMethods;
extern SPageMethods pageLargeMethods;
@ -210,6 +202,14 @@ static int tdbPageDefragment(SPage *pPage) {
}
/* ---------------------------------------------------------------------------------------------------------- */
typedef struct __attribute__((__packed__)) {
u16 flags;
u16 cellNum;
u16 cellBody;
u16 cellFree;
u16 nFree;
} SPageHdr;
// flags
static inline u16 getPageFlags(SPage *pPage) { return ((SPageHdr *)(pPage->pPageHdr))[0].flags; }
static inline void setPageFlags(SPage *pPage, u16 flags) { ((SPageHdr *)(pPage->pPageHdr))[0].flags = flags; }