Lines Matching refs:ele

915 unsigned char *zzlFind(unsigned char *zl, robj *ele, double *score) {  in zzlFind()  argument
918 ele = getDecodedObject(ele); in zzlFind()
921 serverAssertWithInfo(NULL,ele,sptr != NULL); in zzlFind()
923 if (ziplistCompare(eptr,ele->ptr,sdslen(ele->ptr))) { in zzlFind()
926 decrRefCount(ele); in zzlFind()
934 decrRefCount(ele); in zzlFind()
949 unsigned char *zzlInsertAt(unsigned char *zl, unsigned char *eptr, robj *ele, double score) { in zzlInsertAt() argument
955 serverAssertWithInfo(NULL,ele,sdsEncodedObject(ele)); in zzlInsertAt()
958 zl = ziplistPush(zl,ele->ptr,sdslen(ele->ptr),ZIPLIST_TAIL); in zzlInsertAt()
963 zl = ziplistInsert(zl,eptr,ele->ptr,sdslen(ele->ptr)); in zzlInsertAt()
967 serverAssertWithInfo(NULL,ele,(sptr = ziplistNext(zl,eptr)) != NULL); in zzlInsertAt()
976 unsigned char *zzlInsert(unsigned char *zl, robj *ele, double score) { in zzlInsert() argument
980 ele = getDecodedObject(ele); in zzlInsert()
983 serverAssertWithInfo(NULL,ele,sptr != NULL); in zzlInsert()
990 zl = zzlInsertAt(zl,eptr,ele,score); in zzlInsert()
994 if (zzlCompareElements(eptr,ele->ptr,sdslen(ele->ptr)) > 0) { in zzlInsert()
995 zl = zzlInsertAt(zl,eptr,ele,score); in zzlInsert()
1006 zl = zzlInsertAt(zl,NULL,ele,score); in zzlInsert()
1008 decrRefCount(ele); in zzlInsert()
1096 robj *ele; in zsetConvert() local
1123 ele = createStringObjectFromLongLong(vlong); in zsetConvert()
1125 ele = createStringObject((char*)vstr,vlen); in zsetConvert()
1128 node = zslInsert(zs->zsl,score,ele); in zsetConvert()
1129 serverAssertWithInfo(NULL,zobj,dictAdd(zs->dict,ele,&node->score) == DICT_OK); in zsetConvert()
1130 incrRefCount(ele); /* Added to dictionary. */ in zsetConvert()
1152 ele = getDecodedObject(node->obj); in zsetConvert()
1153 zl = zzlInsertAt(zl,NULL,ele,node->score); in zsetConvert()
1154 decrRefCount(ele); in zsetConvert()
1214 robj *ele; in zaddGenericCommand() local
1304 ele = c->argv[scoreidx+1+j*2]; in zaddGenericCommand()
1305 if ((eptr = zzlFind(zobj->ptr,ele,&curscore)) != NULL) { in zaddGenericCommand()
1318 zobj->ptr = zzlInsert(zobj->ptr,ele,score); in zaddGenericCommand()
1326 zobj->ptr = zzlInsert(zobj->ptr,ele,score); in zaddGenericCommand()
1329 if (sdslen(ele->ptr) > server.zset_max_ziplist_value) in zaddGenericCommand()
1340 ele = c->argv[scoreidx+1+j*2] = in zaddGenericCommand()
1342 de = dictFind(zs->dict,ele); in zaddGenericCommand()
1371 znode = zslInsert(zs->zsl,score,ele); in zaddGenericCommand()
1372 incrRefCount(ele); /* Inserted in skiplist. */ in zaddGenericCommand()
1373 serverAssertWithInfo(c,NULL,dictAdd(zs->dict,ele,&znode->score) == DICT_OK); in zaddGenericCommand()
1374 incrRefCount(ele); /* Added to dictionary. */ in zaddGenericCommand()
1636 robj *ele; member
1744 decrRefCount(val->ele); in zuiNext()
1763 val->ele = dictGetKey(it->ht.de); in zuiNext()
1785 val->ele = it->sl.node->obj; in zuiNext()
1803 if (val->ele != NULL) { in zuiLongLongFromValue()
1804 if (val->ele->encoding == OBJ_ENCODING_INT) { in zuiLongLongFromValue()
1805 val->ell = (long)val->ele->ptr; in zuiLongLongFromValue()
1807 } else if (sdsEncodedObject(val->ele)) { in zuiLongLongFromValue()
1808 if (string2ll(val->ele->ptr,sdslen(val->ele->ptr),&val->ell)) in zuiLongLongFromValue()
1825 if (val->ele == NULL) { in zuiObjectFromValue()
1827 val->ele = createStringObject((char*)val->estr,val->elen); in zuiObjectFromValue()
1829 val->ele = createStringObjectFromLongLong(val->ell); in zuiObjectFromValue()
1833 return val->ele; in zuiObjectFromValue()
1838 if (val->ele != NULL) { in zuiBufferFromValue()
1839 if (val->ele->encoding == OBJ_ENCODING_INT) { in zuiBufferFromValue()
1840 val->elen = ll2string((char*)val->_buf,sizeof(val->_buf),(long)val->ele->ptr); in zuiBufferFromValue()
1842 } else if (sdsEncodedObject(val->ele)) { in zuiBufferFromValue()
1843 val->elen = sdslen(val->ele->ptr); in zuiBufferFromValue()
1844 val->estr = val->ele->ptr; in zuiBufferFromValue()
1875 if (dictFind(ht,val->ele) != NULL) { in zuiFind()
1888 if (zzlFind(op->subject->ptr,val->ele,score) != NULL) { in zuiFind()
1897 if ((de = dictFind(zs->dict,val->ele)) != NULL) { in zuiFind()
2136 robj *ele = dictGetKey(de); in zunionInterGenericCommand() local
2138 znode = zslInsert(dstzset->zsl,score,ele); in zunionInterGenericCommand()
2139 incrRefCount(ele); /* added to skiplist */ in zunionInterGenericCommand()
2140 dictAdd(dstzset->dict,ele,&znode->score); in zunionInterGenericCommand()
2141 incrRefCount(ele); /* added to dictionary */ in zunionInterGenericCommand()
2258 robj *ele; in zrangeGenericCommand() local
2273 ele = ln->obj; in zrangeGenericCommand()
2274 addReplyBulk(c,ele); in zrangeGenericCommand()
2855 robj *ele = c->argv[2]; in zrankGenericCommand() local
2864 serverAssertWithInfo(c,ele,sdsEncodedObject(ele)); in zrankGenericCommand()
2877 if (ziplistCompare(eptr,ele->ptr,sdslen(ele->ptr))) in zrankGenericCommand()
2897 ele = c->argv[2]; in zrankGenericCommand()
2898 de = dictFind(zs->dict,ele); in zrankGenericCommand()
2901 rank = zslGetRank(zsl,score,ele); in zrankGenericCommand()
2902 serverAssertWithInfo(c,ele,rank); /* Existing elements always have a rank. */ in zrankGenericCommand()