Lines Matching refs:vlen

168 static unsigned long zipmapRequiredLength(unsigned int klen, unsigned int vlen) {  in zipmapRequiredLength()  argument
171 l = klen+vlen+3; in zipmapRequiredLength()
173 if (vlen >= ZIPMAP_BIGLEN) l += 4; in zipmapRequiredLength()
211 …r *zm, unsigned char *key, unsigned int klen, unsigned char *val, unsigned int vlen, int *update) { in zipmapSet() argument
213 unsigned int freelen, reqlen = zipmapRequiredLength(klen,vlen); in zipmapSet()
273 p += zipmapEncodeLength(p,vlen); in zipmapSet()
275 memcpy(p,val,vlen); in zipmapSet()
315 …ned char *zm, unsigned char **key, unsigned int *klen, unsigned char **value, unsigned int *vlen) { in zipmapNext() argument
325 *vlen = zipmapDecodeLength(zm); in zipmapNext()
326 *value += ZIPMAP_LEN_BYTES(*vlen); in zipmapNext()
334 …igned char *zm, unsigned char *key, unsigned int klen, unsigned char **value, unsigned int *vlen) { in zipmapGet() argument
339 *vlen = zipmapDecodeLength(p); in zipmapGet()
340 *value = p + ZIPMAP_LEN_BYTES(*vlen) + 1; in zipmapGet()
437 unsigned int vlen, i; in zipmapTest() local
441 if (zipmapGet(zm,buf,512,&value,&vlen)) { in zipmapTest()
443 vlen, vlen, value); in zipmapTest()
450 unsigned int vlen; in zipmapTest() local
452 if (zipmapGet(zm,(unsigned char*) "foo",3,&value,&vlen)) { in zipmapTest()
454 vlen, vlen, value); in zipmapTest()
461 unsigned int klen, vlen; in zipmapTest() local
463 while((i = zipmapNext(i,&key,&klen,&value,&vlen)) != NULL) { in zipmapTest()
464 printf(" %d:%.*s => %d:%.*s\n", klen, klen, key, vlen, vlen, value); in zipmapTest()