]> git.saurik.com Git - redis.git/blobdiff - src/dict.c
added an union in the dict.h structure to store 64 bit integers directly into hash...
[redis.git] / src / dict.c
index 24001fdd0a520098eaecdc00bc893d2761968a40..f98fdd0ee78c818b315158cabf7ae4ea0b9ecc04 100644 (file)
@@ -270,7 +270,7 @@ int dictAdd(dict *d, void *key, void *val)
     if ((index = _dictKeyIndex(d, key)) == -1)
         return DICT_ERR;
 
-    /* Allocates the memory and stores key */
+    /* Allocate the memory and store the new entry */
     ht = dictIsRehashing(d) ? &d->ht[1] : &d->ht[0];
     entry = zmalloc(sizeof(*entry));
     entry->next = ht->table[index];
@@ -297,7 +297,6 @@ int dictReplace(dict *d, void *key, void *val)
         return 1;
     /* It already exists, get the entry */
     entry = dictFind(d, key);
-    /* Free the old value and set the new one */
     /* Set the new value and free the old one. Note that it is important
      * to do that in this order, as the value may just be exactly the same
      * as the previous one. In this context, think to reference counting,