]> git.saurik.com Git - redis.git/blobdiff - zipmap.c
HSET fixes, now the new pointer is stored back in the object pointer field
[redis.git] / zipmap.c
index 05bf6d6d9983d64d4055d43379da1f626b6b642c..5729c18f733faa4deadc104dd23ae6d464236ad4 100644 (file)
--- a/zipmap.c
+++ b/zipmap.c
@@ -405,6 +405,13 @@ int main(void) {
     unsigned char *zm;
 
     zm = zipmapNew();
+
+    zm = zipmapSet(zm,(unsigned char*) "name",4, (unsigned char*) "foo",3,NULL);
+    zm = zipmapSet(zm,(unsigned char*) "surname",7, (unsigned char*) "foo",3,NULL);
+    zm = zipmapSet(zm,(unsigned char*) "age",3, (unsigned char*) "foo",3,NULL);
+    zipmapRepr(zm);
+    exit(1);
+
     zm = zipmapSet(zm,(unsigned char*) "hello",5, (unsigned char*) "world!",6,NULL);
     zm = zipmapSet(zm,(unsigned char*) "foo",3, (unsigned char*) "bar",3,NULL);
     zm = zipmapSet(zm,(unsigned char*) "foo",3, (unsigned char*) "!",1,NULL);