~ubuntu-branches/ubuntu/hardy/sqlite3/hardy

« back to all changes in this revision

Viewing changes to src/hash.c

  • Committer: Bazaar Package Importer
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2007-05-17 02:01:42 UTC
  • mfrom: (1.1.8 upstream) (3.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20070517020142-o79d5uduuhfbtknv
Tags: 3.3.17-1
* New upstream release.
* Use minor version as well in sqlite3.pc (closes: #424235).

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
** This is the implementation of generic hash-tables
13
13
** used in SQLite.
14
14
**
15
 
** $Id: hash.c,v 1.18 2006/02/14 10:48:39 danielk1977 Exp $
 
15
** $Id: hash.c,v 1.19 2007/03/31 03:59:24 drh Exp $
16
16
*/
17
17
#include "sqliteInt.h"
18
18
#include <assert.h>
291
291
  if( pEntry->count<=0 ){
292
292
    pEntry->chain = 0;
293
293
  }
294
 
  if( pH->copyKey && elem->pKey ){
 
294
  if( pH->copyKey ){
295
295
    pH->xFree(elem->pKey);
296
296
  }
297
297
  pH->xFree( elem );
378
378
    rehash(pH,8);
379
379
    if( pH->htsize==0 ){
380
380
      pH->count = 0;
 
381
      if( pH->copyKey ){
 
382
        pH->xFree(new_elem->pKey);
 
383
      }
381
384
      pH->xFree(new_elem);
382
385
      return data;
383
386
    }