summaryrefslogtreecommitdiff
path: root/lang/sql/sqlite/ext/fts3/fts3_hash.c
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-02-17 17:25:57 +0000
committer <>2015-03-17 16:26:24 +0000
commit780b92ada9afcf1d58085a83a0b9e6bc982203d1 (patch)
tree598f8b9fa431b228d29897e798de4ac0c1d3d970 /lang/sql/sqlite/ext/fts3/fts3_hash.c
parent7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff)
downloadberkeleydb-master.tar.gz
Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz.HEADdb-6.1.23master
Diffstat (limited to 'lang/sql/sqlite/ext/fts3/fts3_hash.c')
-rw-r--r--lang/sql/sqlite/ext/fts3/fts3_hash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lang/sql/sqlite/ext/fts3/fts3_hash.c b/lang/sql/sqlite/ext/fts3/fts3_hash.c
index 98be5296..1a32a537 100644
--- a/lang/sql/sqlite/ext/fts3/fts3_hash.c
+++ b/lang/sql/sqlite/ext/fts3/fts3_hash.c
@@ -23,13 +23,13 @@
** * The FTS3 module is being built into the core of
** SQLite (in which case SQLITE_ENABLE_FTS3 is defined).
*/
+#include "fts3Int.h"
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
#include <assert.h>
#include <stdlib.h>
#include <string.h>
-#include "sqlite3.h"
#include "fts3_hash.h"
/*
@@ -96,13 +96,13 @@ void sqlite3Fts3HashClear(Fts3Hash *pH){
*/
static int fts3StrHash(const void *pKey, int nKey){
const char *z = (const char *)pKey;
- int h = 0;
+ unsigned h = 0;
if( nKey<=0 ) nKey = (int) strlen(z);
while( nKey > 0 ){
h = (h<<3) ^ h ^ *z++;
nKey--;
}
- return h & 0x7fffffff;
+ return (int)(h & 0x7fffffff);
}
static int fts3StrCompare(const void *pKey1, int n1, const void *pKey2, int n2){
if( n1!=n2 ) return 1;