This commit is contained in:
Hongze Cheng 2022-03-31 02:23:58 +00:00
parent a466372179
commit 14bd838a9f
5 changed files with 7 additions and 9 deletions

View File

@ -5,6 +5,7 @@ AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: true
AlignConsecutiveMacros: true
AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignTrailingComments: true

View File

@ -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

View File

@ -16,8 +16,6 @@
#ifndef _TD_TDB_INTERNAL_H_
#define _TD_TDB_INTERNAL_H_
#include "os.h"
#include "tdb.h"
#ifdef __cplusplus

View File

@ -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

View File

@ -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
}