Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
560e6787
Commit
560e6787
authored
May 19, 2016
by
antirez
Browse files
Clustered dict.c entries WIP.
parent
0d179d17
Changes
1
Show whitespace changes
Inline
Side-by-side
src/dict.h
View file @
560e6787
...
@@ -52,9 +52,13 @@ typedef struct dictEntry {
...
@@ -52,9 +52,13 @@ typedef struct dictEntry {
int64_t
s64
;
int64_t
s64
;
double
d
;
double
d
;
}
v
;
}
v
;
struct
dictEntry
*
next
;
}
dictEntry
;
}
dictEntry
;
typedef
struct
dictEntrySlot
{
unsigned
long
numentries
;
dictEntry
*
entries
;
}
dictEntrySlot
;
typedef
struct
dictType
{
typedef
struct
dictType
{
unsigned
int
(
*
hashFunction
)(
const
void
*
key
);
unsigned
int
(
*
hashFunction
)(
const
void
*
key
);
void
*
(
*
keyDup
)(
void
*
privdata
,
const
void
*
key
);
void
*
(
*
keyDup
)(
void
*
privdata
,
const
void
*
key
);
...
@@ -67,7 +71,7 @@ typedef struct dictType {
...
@@ -67,7 +71,7 @@ typedef struct dictType {
/* This is our hash table structure. Every dictionary has two of this as we
/* This is our hash table structure. Every dictionary has two of this as we
* implement incremental rehashing, for the old to the new table. */
* implement incremental rehashing, for the old to the new table. */
typedef
struct
dictht
{
typedef
struct
dictht
{
dictEntry
**
table
;
dictEntry
Slot
**
table
;
unsigned
long
size
;
unsigned
long
size
;
unsigned
long
sizemask
;
unsigned
long
sizemask
;
unsigned
long
used
;
unsigned
long
used
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment