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
6e9e463f
Commit
6e9e463f
authored
Apr 15, 2010
by
Pieter Noordhuis
Browse files
use shared replies for hset
parent
0c390abc
Changes
1
Hide whitespace changes
Inline
Side-by-side
redis.c
View file @
6e9e463f
...
@@ -6242,13 +6242,13 @@ static robj *hashLookupWriteOrCreate(redisClient *c, robj *key) {
...
@@ -6242,13 +6242,13 @@ static robj *hashLookupWriteOrCreate(redisClient *c, robj *key) {
/* ============================= Hash commands ============================== */
/* ============================= Hash commands ============================== */
static
void
hsetCommand
(
redisClient
*
c
)
{
static
void
hsetCommand
(
redisClient
*
c
)
{
int
update
=
0
;
int
update
;
robj
*
o
;
robj
*
o
;
if
((
o
=
hashLookupWriteOrCreate
(
c
,
c
->
argv
[
1
]))
==
NULL
)
return
;
if
((
o
=
hashLookupWriteOrCreate
(
c
,
c
->
argv
[
1
]))
==
NULL
)
return
;
hashTryConversion
(
o
,
c
->
argv
,
2
,
3
);
hashTryConversion
(
o
,
c
->
argv
,
2
,
3
);
update
=
hashReplace
(
o
,
c
->
argv
[
2
],
c
->
argv
[
3
]);
update
=
hashReplace
(
o
,
c
->
argv
[
2
],
c
->
argv
[
3
]);
addReply
Sds
(
c
,
sdscatprintf
(
sdsempty
(),
":%d
\r\n
"
,
update
==
0
)
);
addReply
(
c
,
update
?
shared
.
czero
:
shared
.
cone
);
server
.
dirty
++
;
server
.
dirty
++
;
}
}
...
...
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