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
13585dd6
Commit
13585dd6
authored
Jun 26, 2013
by
antirez
Browse files
function renamed: popcount_binary -> redisPopcount.
parent
bae60ede
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bitops.c
View file @
13585dd6
...
...
@@ -58,7 +58,7 @@ static int getBitOffsetFromArgument(redisClient *c, robj *o, size_t *offset) {
/* Count number of bits set in the binary array pointed by 's' and long
* 'count' bytes. The implementation of this function is required to
* work with a input string length up to 512 MB. */
size_t
p
opcount
_binary
(
void
*
s
,
long
count
)
{
size_t
redisP
opcount
(
void
*
s
,
long
count
)
{
size_t
bits
=
0
;
unsigned
char
*
p
;
uint32_t
*
p4
=
s
;
...
...
@@ -407,6 +407,6 @@ void bitcountCommand(redisClient *c) {
}
else
{
long
bytes
=
end
-
start
+
1
;
addReplyLongLong
(
c
,
p
opcount
_binary
(
p
+
start
,
bytes
));
addReplyLongLong
(
c
,
redisP
opcount
(
p
+
start
,
bytes
));
}
}
src/redis.h
View file @
13585dd6
...
...
@@ -1029,7 +1029,7 @@ long long mstime(void);
void
getRandomHexChars
(
char
*
p
,
unsigned
int
len
);
uint64_t
crc64
(
uint64_t
crc
,
const
unsigned
char
*
s
,
uint64_t
l
);
void
exitFromChild
(
int
retcode
);
size_t
p
opcount
_binary
(
void
*
s
,
long
count
);
size_t
redisP
opcount
(
void
*
s
,
long
count
);
void
redisSetProcTitle
(
char
*
title
);
/* networking.c -- Networking and Client related operations */
...
...
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