Lines Matching refs:subject
41 void listTypePush(robj *subject, robj *value, int where) { in listTypePush() argument
42 if (subject->encoding == OBJ_ENCODING_QUICKLIST) { in listTypePush()
46 quicklistPush(subject->ptr, value->ptr, len, pos); in listTypePush()
57 robj *listTypePop(robj *subject, int where) { in listTypePop() argument
62 if (subject->encoding == OBJ_ENCODING_QUICKLIST) { in listTypePop()
63 if (quicklistPopCustom(subject->ptr, ql_where, (unsigned char **)&value, in listTypePop()
74 unsigned long listTypeLength(robj *subject) { in listTypeLength() argument
75 if (subject->encoding == OBJ_ENCODING_QUICKLIST) { in listTypeLength()
76 return quicklistCount(subject->ptr); in listTypeLength()
83 listTypeIterator *listTypeInitIterator(robj *subject, long index, in listTypeInitIterator() argument
86 li->subject = subject; in listTypeInitIterator()
87 li->encoding = subject->encoding; in listTypeInitIterator()
95 li->iter = quicklistGetIteratorAtIdx(li->subject->ptr, in listTypeInitIterator()
114 serverAssert(li->subject->encoding == li->encoding); in listTypeNext()
179 void listTypeConvert(robj *subject, int enc) { in listTypeConvert() argument
180 serverAssertWithInfo(NULL,subject,subject->type==OBJ_LIST); in listTypeConvert()
181 serverAssertWithInfo(NULL,subject,subject->encoding==OBJ_ENCODING_ZIPLIST); in listTypeConvert()
186 subject->ptr = quicklistCreateFromZiplist(zlen, depth, subject->ptr); in listTypeConvert()
187 subject->encoding = OBJ_ENCODING_QUICKLIST; in listTypeConvert()
236 robj *subject; in pushxGenericCommand() local
241 if ((subject = lookupKeyWriteOrReply(c,c->argv[1],shared.czero)) == NULL || in pushxGenericCommand()
242 checkType(c,subject,OBJ_LIST)) return; in pushxGenericCommand()
246 iter = listTypeInitIterator(subject,0,LIST_TAIL); in pushxGenericCommand()
269 listTypePush(subject,val,where); in pushxGenericCommand()
275 addReplyLongLong(c,listTypeLength(subject)); in pushxGenericCommand()
482 robj *subject, *obj; in lremCommand() local
490 subject = lookupKeyWriteOrReply(c,c->argv[1],shared.czero); in lremCommand()
491 if (subject == NULL || checkType(c,subject,OBJ_LIST)) return; in lremCommand()
496 li = listTypeInitIterator(subject,-1,LIST_HEAD); in lremCommand()
498 li = listTypeInitIterator(subject,0,LIST_TAIL); in lremCommand()
517 if (listTypeLength(subject) == 0) { in lremCommand()