]> git.saurik.com Git - redis.git/commitdiff
Changes to TODO list, commented a function in redis.c
authorantirez <antirez@gmail.com>
Sat, 28 Nov 2009 14:31:40 +0000 (15:31 +0100)
committerantirez <antirez@gmail.com>
Sat, 28 Nov 2009 14:31:40 +0000 (15:31 +0100)
TODO
redis.c

diff --git a/TODO b/TODO
index dd6d163feeadf528cea3afbe12f48008972dc200..b93a89da7f85324252b6f2addce7ed40348641b8 100644 (file)
--- a/TODO
+++ b/TODO
@@ -7,7 +7,6 @@ Most of the features already implemented for this release. The following is a li
 
 * For now only the last argument gets integer encoded, so make sure that: 1) every multi bulk command implemented will have the last arg that is indeed a value, and not used otherwise. 2) to explicitly call the function to encode the object in MSET and other commands where there are multiple "values".
 * Man pages for SRANDMEMBER, missing Z-commands, ...
-* Use strcoll() to compare objects in sorted sets, like it already happens for SORT.
 * Write docs for the "STORE" operaiton of SORT. Link to the article about SORT by written by defunkt.
 * ZRANGEBYSCORE test, ZRANGEBYSCORE LIMIT option.
 * Sorted sets infinity tests.
diff --git a/redis.c b/redis.c
index bcde90c39faa89aa22ed44074c327ad6bc6a5c7e..dff33754fb4109d4267a4a2412d736815550a62c 100644 (file)
--- a/redis.c
+++ b/redis.c
@@ -2309,7 +2309,11 @@ static robj *getDecodedObject(robj *o) {
 /* Compare two string objects via strcmp() or alike.
  * Note that the objects may be integer-encoded. In such a case we
  * use snprintf() to get a string representation of the numbers on the stack
- * and compare the strings, it's much faster than calling getDecodedObject(). */
+ * and compare the strings, it's much faster than calling getDecodedObject().
+ *
+ * Important note: if objects are not integer encoded, but binary-safe strings,
+ * sdscmp() from sds.c will apply memcmp() so this function ca be considered
+ * binary safe. */
 static int compareStringObjects(robj *a, robj *b) {
     assert(a->type == REDIS_STRING && b->type == REDIS_STRING);
     char bufa[128], bufb[128], *astr, *bstr;