提交 14bd838a 编写于 作者: H Hongze Cheng

more TDB

上级 a4663721
...@@ -5,6 +5,7 @@ AccessModifierOffset: -1 ...@@ -5,6 +5,7 @@ AccessModifierOffset: -1
AlignAfterOpenBracket: Align AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: true AlignConsecutiveDeclarations: true
AlignConsecutiveMacros: true
AlignEscapedNewlinesLeft: true AlignEscapedNewlinesLeft: true
AlignOperands: true AlignOperands: true
AlignTrailingComments: true AlignTrailingComments: true
......
...@@ -95,7 +95,7 @@ int tdbRollback(TENV *pEnv) { ...@@ -95,7 +95,7 @@ int tdbRollback(TENV *pEnv) {
} }
SPager *tdbEnvGetPager(TENV *pEnv, const char *fname) { SPager *tdbEnvGetPager(TENV *pEnv, const char *fname) {
int hash; u32 hash;
SPager **ppPager; SPager **ppPager;
hash = tdbCstringHash(fname); hash = tdbCstringHash(fname);
...@@ -107,7 +107,7 @@ SPager *tdbEnvGetPager(TENV *pEnv, const char *fname) { ...@@ -107,7 +107,7 @@ SPager *tdbEnvGetPager(TENV *pEnv, const char *fname) {
} }
void tdbEnvAddPager(TENV *pEnv, SPager *pPager) { void tdbEnvAddPager(TENV *pEnv, SPager *pPager) {
int hash; u32 hash;
SPager **ppPager; SPager **ppPager;
// rehash if neccessary // rehash if neccessary
...@@ -130,7 +130,7 @@ void tdbEnvAddPager(TENV *pEnv, SPager *pPager) { ...@@ -130,7 +130,7 @@ void tdbEnvAddPager(TENV *pEnv, SPager *pPager) {
} }
void tdbEnvRemovePager(TENV *pEnv, SPager *pPager) { void tdbEnvRemovePager(TENV *pEnv, SPager *pPager) {
int hash; u32 hash;
SPager **ppPager; SPager **ppPager;
// remove from the list // remove from the list
......
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
#ifndef _TD_TDB_INTERNAL_H_ #ifndef _TD_TDB_INTERNAL_H_
#define _TD_TDB_INTERNAL_H_ #define _TD_TDB_INTERNAL_H_
#include "os.h"
#include "tdb.h" #include "tdb.h"
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -24,6 +24,8 @@ extern "C" { ...@@ -24,6 +24,8 @@ extern "C" {
#define TDB_FOR_TDENGINE #define TDB_FOR_TDENGINE
#ifdef TDB_FOR_TDENGINE #ifdef TDB_FOR_TDENGINE
#include "os.h"
#include "thash.h"
// For memory ----------------- // For memory -----------------
#define tdbOsMalloc taosMemoryMalloc #define tdbOsMalloc taosMemoryMalloc
......
...@@ -101,10 +101,7 @@ static inline int tdbGetVarInt(const u8 *p, int *v) { ...@@ -101,10 +101,7 @@ static inline int tdbGetVarInt(const u8 *p, int *v) {
return n; return n;
} }
static inline int tdbCstringHash(const char *s) { static inline u32 tdbCstringHash(const char *s) { return MurmurHash3_32(s, strlen(s)); }
// TODO
return 0;
}
#ifdef __cplusplus #ifdef __cplusplus
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册