dictReleaseIterator(di);
} else if (o->encoding == REDIS_ENCODING_INTSET) {
intset *is = o->ptr;
- long long llval;
+ int64_t llval;
int i = 0;
if (rdbSaveLen(fp,intsetLen(is)) == -1) return -1;
if (o->encoding == REDIS_ENCODING_INTSET) {
/* Fetch integer value from element */
- if (getLongLongFromObject(ele,&llval) == REDIS_OK) {
+ if (isObjectRepresentableAsLongLong(ele,&llval) == REDIS_OK) {
o->ptr = intsetAdd(o->ptr,llval,NULL);
} else {
setTypeConvert(o,REDIS_ENCODING_HT);
* to regular hashtable encoded set */
if (o->encoding == REDIS_ENCODING_HT) {
dictAdd((dict*)o->ptr,ele,NULL);
+ } else {
+ decrRefCount(ele);
}
}
} else if (type == REDIS_ZSET) {