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

more TDB

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