提交 df1caa70 编写于 作者: H Hongze Cheng

more TDB

上级 465dac82
...@@ -15,14 +15,6 @@ ...@@ -15,14 +15,6 @@
#include "tdbInt.h" #include "tdbInt.h"
typedef struct __attribute__((__packed__)) {
u16 flags;
u16 cellNum;
u16 cellBody;
u16 cellFree;
u16 nFree;
} SPageHdr;
extern SPageMethods pageMethods; extern SPageMethods pageMethods;
extern SPageMethods pageLargeMethods; extern SPageMethods pageLargeMethods;
...@@ -210,6 +202,14 @@ static int tdbPageDefragment(SPage *pPage) { ...@@ -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 // flags
static inline u16 getPageFlags(SPage *pPage) { return ((SPageHdr *)(pPage->pPageHdr))[0].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; } static inline void setPageFlags(SPage *pPage, u16 flags) { ((SPageHdr *)(pPage->pPageHdr))[0].flags = flags; }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册