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
91c3c742
Unverified
Commit
91c3c742
authored
Aug 09, 2022
by
judeng
Committed by
GitHub
Aug 09, 2022
Browse files
fix typos around dict funtions of cstring (#11092)
replace "dist" with "dict"
parent
3270f2d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server.c
View file @
91c3c742
...
@@ -291,17 +291,17 @@ uint64_t dictSdsCaseHash(const void *key) {
...
@@ -291,17 +291,17 @@ uint64_t dictSdsCaseHash(const void *key) {
}
}
/* Dict hash function for null terminated string */
/* Dict hash function for null terminated string */
uint64_t
di
s
tCStrHash
(
const
void
*
key
)
{
uint64_t
di
c
tCStrHash
(
const
void
*
key
)
{
return
dictGenHashFunction
((
unsigned
char
*
)
key
,
strlen
((
char
*
)
key
));
return
dictGenHashFunction
((
unsigned
char
*
)
key
,
strlen
((
char
*
)
key
));
}
}
/* Dict hash function for null terminated string */
/* Dict hash function for null terminated string */
uint64_t
di
s
tCStrCaseHash
(
const
void
*
key
)
{
uint64_t
di
c
tCStrCaseHash
(
const
void
*
key
)
{
return
dictGenCaseHashFunction
((
unsigned
char
*
)
key
,
strlen
((
char
*
)
key
));
return
dictGenCaseHashFunction
((
unsigned
char
*
)
key
,
strlen
((
char
*
)
key
));
}
}
/* Dict compare function for null terminated string */
/* Dict compare function for null terminated string */
int
di
s
tCStrKeyCompare
(
dict
*
d
,
const
void
*
key1
,
const
void
*
key2
)
{
int
di
c
tCStrKeyCompare
(
dict
*
d
,
const
void
*
key1
,
const
void
*
key2
)
{
int
l1
,
l2
;
int
l1
,
l2
;
UNUSED
(
d
);
UNUSED
(
d
);
...
@@ -312,7 +312,7 @@ int distCStrKeyCompare(dict *d, const void *key1, const void *key2) {
...
@@ -312,7 +312,7 @@ int distCStrKeyCompare(dict *d, const void *key1, const void *key2) {
}
}
/* Dict case insensitive compare function for null terminated string */
/* Dict case insensitive compare function for null terminated string */
int
di
s
tCStrKeyCaseCompare
(
dict
*
d
,
const
void
*
key1
,
const
void
*
key2
)
{
int
di
c
tCStrKeyCaseCompare
(
dict
*
d
,
const
void
*
key1
,
const
void
*
key2
)
{
UNUSED
(
d
);
UNUSED
(
d
);
return
strcasecmp
(
key1
,
key2
)
==
0
;
return
strcasecmp
(
key1
,
key2
)
==
0
;
}
}
...
@@ -518,10 +518,10 @@ dictType migrateCacheDictType = {
...
@@ -518,10 +518,10 @@ dictType migrateCacheDictType = {
/* Dict for for case-insensitive search using null terminated C strings.
/* Dict for for case-insensitive search using null terminated C strings.
* The keys stored in dict are sds though. */
* The keys stored in dict are sds though. */
dictType
stringSetDictType
=
{
dictType
stringSetDictType
=
{
di
s
tCStrCaseHash
,
/* hash function */
di
c
tCStrCaseHash
,
/* hash function */
NULL
,
/* key dup */
NULL
,
/* key dup */
NULL
,
/* val dup */
NULL
,
/* val dup */
di
s
tCStrKeyCaseCompare
,
/* key compare */
di
c
tCStrKeyCaseCompare
,
/* key compare */
dictSdsDestructor
,
/* key destructor */
dictSdsDestructor
,
/* key destructor */
NULL
,
/* val destructor */
NULL
,
/* val destructor */
NULL
/* allow to expand */
NULL
/* allow to expand */
...
@@ -530,10 +530,10 @@ dictType stringSetDictType = {
...
@@ -530,10 +530,10 @@ dictType stringSetDictType = {
/* Dict for for case-insensitive search using null terminated C strings.
/* Dict for for case-insensitive search using null terminated C strings.
* The key and value do not have a destructor. */
* The key and value do not have a destructor. */
dictType
externalStringType
=
{
dictType
externalStringType
=
{
di
s
tCStrCaseHash
,
/* hash function */
di
c
tCStrCaseHash
,
/* hash function */
NULL
,
/* key dup */
NULL
,
/* key dup */
NULL
,
/* val dup */
NULL
,
/* val dup */
di
s
tCStrKeyCaseCompare
,
/* key compare */
di
c
tCStrKeyCaseCompare
,
/* key compare */
NULL
,
/* key destructor */
NULL
,
/* key destructor */
NULL
,
/* val destructor */
NULL
,
/* val destructor */
NULL
/* allow to expand */
NULL
/* allow to expand */
...
...
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