mirror of
https://github.com/fluencelabs/redis
synced 2025-06-12 16:51:22 +00:00
Use const in Redis Module API where possible.
This commit is contained in:
@ -1100,12 +1100,12 @@ unsigned char *zzlDeleteRangeByRank(unsigned char *zl, unsigned int start, unsig
|
||||
* Common sorted set API
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
unsigned int zsetLength(robj *zobj) {
|
||||
unsigned int zsetLength(const robj *zobj) {
|
||||
int length = -1;
|
||||
if (zobj->encoding == OBJ_ENCODING_ZIPLIST) {
|
||||
length = zzlLength(zobj->ptr);
|
||||
} else if (zobj->encoding == OBJ_ENCODING_SKIPLIST) {
|
||||
length = ((zset*)zobj->ptr)->zsl->length;
|
||||
length = ((const zset*)zobj->ptr)->zsl->length;
|
||||
} else {
|
||||
serverPanic("Unknown sorted set encoding");
|
||||
}
|
||||
|
Reference in New Issue
Block a user