From: Pieter Noordhuis Date: Thu, 9 Dec 2010 09:37:35 +0000 (+0100) Subject: Undo rename of function names where something went wrong X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/a30047736806e54af0459a2c41767bf0ebc6a572?hp=c2f816b4233355b6b8426572bd6e2c024fa24193 Undo rename of function names where something went wrong --- diff --git a/src/t_zset.c b/src/t_zset.c index 27522367..9539357c 100644 --- a/src/t_zset.c +++ b/src/t_zset.c @@ -263,7 +263,7 @@ zskiplistNode *zslFirstWithScore(zskiplist *zsl, double score) { * Returns 0 when the element cannot be found, rank otherwise. * Note that the rank is 1-based due to the span of zsl->header to the * first element. */ -unsigned long zslistTypeGetRank(zskiplist *zsl, double score, robj *o) { +unsigned long zslGetRank(zskiplist *zsl, double score, robj *o) { zskiplistNode *x; unsigned long rank = 0; int i; @@ -287,7 +287,7 @@ unsigned long zslistTypeGetRank(zskiplist *zsl, double score, robj *o) { } /* Finds an element by its rank. The rank argument needs to be 1-based. */ -zskiplistNode* zslistTypeGetElementByRank(zskiplist *zsl, unsigned long rank) { +zskiplistNode* zslGetElementByRank(zskiplist *zsl, unsigned long rank) { zskiplistNode *x; unsigned long traversed = 0; int i; @@ -810,10 +810,10 @@ void zrangeGenericCommand(redisClient *c, int reverse) { /* check if starting point is trivial, before searching * the element in log(N) time */ if (reverse) { - ln = start == 0 ? zsl->tail : zslistTypeGetElementByRank(zsl, llen-start); + ln = start == 0 ? zsl->tail : zslGetElementByRank(zsl, llen-start); } else { ln = start == 0 ? - zsl->header->level[0].forward : zslistTypeGetElementByRank(zsl, start+1); + zsl->header->level[0].forward : zslGetElementByRank(zsl, start+1); } /* Return the result in form of a multi-bulk reply */ @@ -1039,7 +1039,7 @@ void zrankGenericCommand(redisClient *c, int reverse) { } score = dictGetEntryVal(de); - rank = zslistTypeGetRank(zsl, *score, c->argv[2]); + rank = zslGetRank(zsl, *score, c->argv[2]); if (rank) { if (reverse) { addReplyLongLong(c, zsl->length - rank);