提交 3b2f61a5 编写于 作者: H Hongze Cheng

start new refact

上级 a2b19087
...@@ -40,7 +40,7 @@ struct SBTree { ...@@ -40,7 +40,7 @@ struct SBTree {
#define TDB_BTREE_PAGE_COMMON_HDR u8 flags; #define TDB_BTREE_PAGE_COMMON_HDR u8 flags;
#define TDB_BTREE_PAGE_GET_FLAGS(PAGE) (PAGE)->pData[0] #define TDB_BTREE_PAGE_GET_FLAGS(PAGE) (PAGE)->pData[0]
#define TDB_BTREE_PAGE_SET_FLAGS(PAGE, flags) ((PAGE)->pData[0] = (flags)) #define TDB_BTREE_PAGE_SET_FLAGS(PAGE, flags) ((PAGE)->pData[0] = (flags))
typedef struct __attribute__((__packed__)) { typedef struct __attribute__((__packed__)) {
...@@ -892,7 +892,7 @@ static int tdbBtreeBalance(SBTC *pBtc) { ...@@ -892,7 +892,7 @@ static int tdbBtreeBalance(SBTC *pBtc) {
} }
#endif #endif
#ifndef TDB_BTREE_CELL // ========================================================= // TDB_BTREE_CELL =====================
static int tdbBtreeEncodePayload(SPage *pPage, u8 *pPayload, const void *pKey, int kLen, const void *pVal, int vLen, static int tdbBtreeEncodePayload(SPage *pPage, u8 *pPayload, const void *pKey, int kLen, const void *pVal, int vLen,
int *szPayload) { int *szPayload) {
int nPayload; int nPayload;
...@@ -923,7 +923,6 @@ static int tdbBtreeEncodePayload(SPage *pPage, u8 *pPayload, const void *pKey, i ...@@ -923,7 +923,6 @@ static int tdbBtreeEncodePayload(SPage *pPage, u8 *pPayload, const void *pKey, i
return 0; return 0;
} }
// TODO: allow vLen = 0
static int tdbBtreeEncodeCell(SPage *pPage, const void *pKey, int kLen, const void *pVal, int vLen, SCell *pCell, static int tdbBtreeEncodeCell(SPage *pPage, const void *pKey, int kLen, const void *pVal, int vLen, SCell *pCell,
int *szCell) { int *szCell) {
u8 flags; u8 flags;
...@@ -1079,8 +1078,7 @@ static int tdbBtreeCellSize(const SPage *pPage, SCell *pCell) { ...@@ -1079,8 +1078,7 @@ static int tdbBtreeCellSize(const SPage *pPage, SCell *pCell) {
return szCell; return szCell;
} }
// TDB_BTREE_CELL
#endif
int tdbBtcOpen(SBTC *pBtc, SBTree *pBt) { int tdbBtcOpen(SBTC *pBtc, SBTree *pBt) {
pBtc->pBt = pBt; pBtc->pBt = pBt;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册