Commit 13585dd6 authored by antirez's avatar antirez
Browse files

function renamed: popcount_binary -> redisPopcount.

parent bae60ede
...@@ -58,7 +58,7 @@ static int getBitOffsetFromArgument(redisClient *c, robj *o, size_t *offset) { ...@@ -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 number of bits set in the binary array pointed by 's' and long
* 'count' bytes. The implementation of this function is required to * 'count' bytes. The implementation of this function is required to
* work with a input string length up to 512 MB. */ * work with a input string length up to 512 MB. */
size_t popcount_binary(void *s, long count) { size_t redisPopcount(void *s, long count) {
size_t bits = 0; size_t bits = 0;
unsigned char *p; unsigned char *p;
uint32_t *p4 = s; uint32_t *p4 = s;
...@@ -407,6 +407,6 @@ void bitcountCommand(redisClient *c) { ...@@ -407,6 +407,6 @@ void bitcountCommand(redisClient *c) {
} else { } else {
long bytes = end-start+1; long bytes = end-start+1;
addReplyLongLong(c,popcount_binary(p+start,bytes)); addReplyLongLong(c,redisPopcount(p+start,bytes));
} }
} }
...@@ -1029,7 +1029,7 @@ long long mstime(void); ...@@ -1029,7 +1029,7 @@ long long mstime(void);
void getRandomHexChars(char *p, unsigned int len); void getRandomHexChars(char *p, unsigned int len);
uint64_t crc64(uint64_t crc, const unsigned char *s, uint64_t l); uint64_t crc64(uint64_t crc, const unsigned char *s, uint64_t l);
void exitFromChild(int retcode); void exitFromChild(int retcode);
size_t popcount_binary(void *s, long count); size_t redisPopcount(void *s, long count);
void redisSetProcTitle(char *title); void redisSetProcTitle(char *title);
/* networking.c -- Networking and Client related operations */ /* networking.c -- Networking and Client related operations */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment