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
5727b9aa
Commit
5727b9aa
authored
Apr 08, 2010
by
antirez
Browse files
Merge branch 'issue_218' of
git://github.com/pietern/redis
parents
10c2baa5
aa7c2934
Changes
1
Hide whitespace changes
Inline
Side-by-side
redis.c
View file @
5727b9aa
...
...
@@ -2602,6 +2602,21 @@ static void addReplyLong(redisClient *c, long l) {
addReplySds(c,sdsnewlen(buf,len));
}
static void addReplyLongLong(redisClient *c, long long ll) {
char buf[128];
size_t len;
if (ll == 0) {
addReply(c,shared.czero);
return;
} else if (ll == 1) {
addReply(c,shared.cone);
return;
}
len = snprintf(buf,sizeof(buf),":%lld\r\n",ll);
addReplySds(c,sdsnewlen(buf,len));
}
static void addReplyUlong(redisClient *c, unsigned long ul) {
char buf[128];
size_t len;
...
...
@@ -6038,10 +6053,7 @@ static void hincrbyCommand(redisClient *c) {
}
}
robj *o_incr = getDecodedObject(c->argv[3]);
incr = strtoll(o_incr->ptr, NULL, 10);
decrRefCount(o_incr);
incr = strtoll(c->argv[3]->ptr, NULL, 10);
if (o->encoding == REDIS_ENCODING_ZIPMAP) {
unsigned char *zm = o->ptr;
unsigned char *zval;
...
...
@@ -6092,7 +6104,7 @@ static void hincrbyCommand(redisClient *c) {
}
server.dirty++;
addReplyLong(c, value);
addReplyLong
Long
(c, value);
}
static void hgetCommand(redisClient *c) {
...
...
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