Lines Matching refs:o

142     robj *o = lookupKeyRead(c->db, key);  in lookupKeyReadOrReply()  local
143 if (!o) addReply(c,reply); in lookupKeyReadOrReply()
144 return o; in lookupKeyReadOrReply()
148 robj *o = lookupKeyWrite(c->db, key); in lookupKeyWriteOrReply() local
149 if (!o) addReply(c,reply); in lookupKeyWriteOrReply()
150 return o; in lookupKeyWriteOrReply()
265 robj *dbUnshareStringValue(redisDb *db, robj *key, robj *o) { in dbUnshareStringValue() argument
266 serverAssert(o->type == OBJ_STRING); in dbUnshareStringValue()
267 if (o->refcount != 1 || o->encoding != OBJ_ENCODING_RAW) { in dbUnshareStringValue()
268 robj *decoded = getDecodedObject(o); in dbUnshareStringValue()
269 o = createRawStringObject(decoded->ptr, sdslen(decoded->ptr)); in dbUnshareStringValue()
271 dbOverwrite(db,key,o); in dbUnshareStringValue()
273 return o; in dbUnshareStringValue()
435 robj *o = pd[1]; in scanCallback() local
438 if (o == NULL) { in scanCallback()
441 } else if (o->type == OBJ_SET) { in scanCallback()
444 } else if (o->type == OBJ_HASH) { in scanCallback()
449 } else if (o->type == OBJ_ZSET) { in scanCallback()
465 int parseScanCursorOrReply(client *c, robj *o, unsigned long *cursor) { in parseScanCursorOrReply() argument
471 *cursor = strtoul(o->ptr, &eptr, 10); in parseScanCursorOrReply()
472 if (isspace(((char*)o->ptr)[0]) || eptr[0] != '\0' || errno == ERANGE) in parseScanCursorOrReply()
491 void scanGenericCommand(client *c, robj *o, unsigned long cursor) { in scanGenericCommand() argument
502 serverAssert(o == NULL || o->type == OBJ_SET || o->type == OBJ_HASH || in scanGenericCommand()
503 o->type == OBJ_ZSET); in scanGenericCommand()
506 i = (o == NULL) ? 2 : 3; /* Skip the key argument if needed. */ in scanGenericCommand()
549 if (o == NULL) { in scanGenericCommand()
551 } else if (o->type == OBJ_SET && o->encoding == OBJ_ENCODING_HT) { in scanGenericCommand()
552 ht = o->ptr; in scanGenericCommand()
553 } else if (o->type == OBJ_HASH && o->encoding == OBJ_ENCODING_HT) { in scanGenericCommand()
554 ht = o->ptr; in scanGenericCommand()
556 } else if (o->type == OBJ_ZSET && o->encoding == OBJ_ENCODING_SKIPLIST) { in scanGenericCommand()
557 zset *zs = o->ptr; in scanGenericCommand()
574 privdata[1] = o; in scanGenericCommand()
580 } else if (o->type == OBJ_SET) { in scanGenericCommand()
584 while(intsetGet(o->ptr,pos++,&ll)) in scanGenericCommand()
587 } else if (o->type == OBJ_HASH || o->type == OBJ_ZSET) { in scanGenericCommand()
588 unsigned char *p = ziplistIndex(o->ptr,0); in scanGenericCommand()
598 p = ziplistNext(o->ptr,p); in scanGenericCommand()
628 if (!filter && o == NULL && expireIfNeeded(c->db, kobj)) filter = 1; in scanGenericCommand()
639 if (o && (o->type == OBJ_ZSET || o->type == OBJ_HASH)) { in scanGenericCommand()
684 robj *o; in typeCommand() local
687 o = lookupKeyReadWithFlags(c->db,c->argv[1],LOOKUP_NOTOUCH); in typeCommand()
688 if (o == NULL) { in typeCommand()
691 switch(o->type) { in typeCommand()
732 robj *o; in renameGenericCommand() local
740 if ((o = lookupKeyWriteOrReply(c,c->argv[1],shared.nokeyerr)) == NULL) in renameGenericCommand()
748 incrRefCount(o); in renameGenericCommand()
752 decrRefCount(o); in renameGenericCommand()
760 dbAdd(c->db,c->argv[2],o); in renameGenericCommand()
782 robj *o; in moveCommand() local
814 o = lookupKeyWrite(c->db,c->argv[1]); in moveCommand()
815 if (!o) { in moveCommand()
826 dbAdd(dst,c->argv[1],o); in moveCommand()
828 incrRefCount(o); in moveCommand()