/ Check-in [9e91b729]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:fix an HPUX bug (CVS 1709)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:9e91b729f0a708b08060979a4998be890b6d268d
User & Date: drh 2000-10-19 15:28:41
Context
2000-10-22
20:39
fix a debugging issue (CVS 162) check-in: f0a5255d user: drh tags: trunk
2000-10-19
15:28
fix an HPUX bug (CVS 1709) check-in: 9e91b729 user: drh tags: trunk
15:00
Version 1.0.14 (CVS 489) check-in: 4788dc32 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to src/dbbemem.c.

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
...
133
134
135
136
137
138
139


140
141
142
143
144
145
146
147
** This file contains code to implement the database backend (DBBE)
** for sqlite.  The database backend is the interface between
** sqlite and the code that does the actually reading and writing
** of information to the disk.
**
** This file uses an in-memory hash talbe as the database backend. 
**
** $Id: dbbemem.c,v 1.3 2000/10/19 14:18:34 drh Exp $
*/
#include "sqliteInt.h"
#include <sys/stat.h>
#include <unistd.h>
#include <ctype.h>
#include <time.h>

................................................................................

/*
** Generate a hash from an N-byte key
*/
static int ArrayHash(Datum d){
  int h = 0;
  while( d.n-- > 0 ){


    h = (h<<9) ^ (h<<3) ^ h ^ *(((char*)d.p)++);
  }
  if( h<0 ) h = -h; 
  return h;
}

/* Resize the hash table for a Array array
*/







|







 







>
>
|







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
...
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
** This file contains code to implement the database backend (DBBE)
** for sqlite.  The database backend is the interface between
** sqlite and the code that does the actually reading and writing
** of information to the disk.
**
** This file uses an in-memory hash talbe as the database backend. 
**
** $Id: dbbemem.c,v 1.4 2000/10/19 15:28:41 drh Exp $
*/
#include "sqliteInt.h"
#include <sys/stat.h>
#include <unistd.h>
#include <ctype.h>
#include <time.h>

................................................................................

/*
** Generate a hash from an N-byte key
*/
static int ArrayHash(Datum d){
  int h = 0;
  while( d.n-- > 0 ){
    /* The funky case "*(char**)&d.p" is to work around a bug the
    ** c89 compiler of HPUX. */
    h = (h<<9) ^ (h<<3) ^ h ^ *((*(char**)&d.p)++);
  }
  if( h<0 ) h = -h; 
  return h;
}

/* Resize the hash table for a Array array
*/