mirror of
https://github.com/fluencelabs/redis
synced 2025-06-20 20:46:31 +00:00
Use const in Redis Module API where possible.
This commit is contained in:
@ -219,11 +219,11 @@ int setTypeRandomElement(robj *setobj, sds *sdsele, int64_t *llele) {
|
||||
return setobj->encoding;
|
||||
}
|
||||
|
||||
unsigned long setTypeSize(robj *subject) {
|
||||
unsigned long setTypeSize(const robj *subject) {
|
||||
if (subject->encoding == OBJ_ENCODING_HT) {
|
||||
return dictSize((dict*)subject->ptr);
|
||||
return dictSize((const dict*)subject->ptr);
|
||||
} else if (subject->encoding == OBJ_ENCODING_INTSET) {
|
||||
return intsetLen((intset*)subject->ptr);
|
||||
return intsetLen((const intset*)subject->ptr);
|
||||
} else {
|
||||
serverPanic("Unknown set encoding");
|
||||
}
|
||||
|
Reference in New Issue
Block a user