~flier-lu/libmemcached/win32-vs2008

« back to all changes in this revision

Viewing changes to libhashkit/hashkit.c

  • Committer: Flier Lu
  • Date: 2011-01-07 03:32:39 UTC
  • Revision ID: flier.lu@gmail.com-20110107033239-xzqsidly4xy0hm9r
port libhashkit to win32

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
#include "common.h"
10
10
 
11
 
static const hashkit_st global_default_hash= {
12
 
  .base_hash= {
13
 
    .function= hashkit_one_at_a_time,
14
 
    .context= NULL
15
 
  },
16
 
  .flags= {
17
 
    .is_base_same_distributed= false,
18
 
  }
19
 
};
 
11
static hashkit_st global_default_hash;
20
12
 
21
13
static inline bool _hashkit_init(hashkit_st *self)
22
14
{
 
15
  memset(&global_default_hash, 0, sizeof(global_default_hash));
 
16
 
 
17
  global_default_hash.base_hash.function = hashkit_one_at_a_time;
 
18
  global_default_hash.base_hash.context = NULL;
 
19
  global_default_hash.flags.is_base_same_distributed = false;
 
20
 
23
21
  self->base_hash= global_default_hash.base_hash;
24
22
  self->distribution_hash= global_default_hash.base_hash;
25
23
  self->flags= global_default_hash.flags;