dav/tags.c

changeset 767
f4acc783f25e
parent 747
efbd59642577
child 768
eb495f3d4065
equal deleted inserted replaced
766:c4993f0991e4 767:f4acc783f25e
108 108
109 return tags; 109 return tags;
110 } 110 }
111 111
112 CxMap* taglist2map(CxList *tags) { 112 CxMap* taglist2map(CxList *tags) {
113 if(!tags) {
114 return cxHashMapCreate(cxDefaultAllocator, CX_STORE_POINTERS, 8);
115 }
116
113 CxMap *map = cxHashMapCreate(cxDefaultAllocator, CX_STORE_POINTERS, tags->size + 8); 117 CxMap *map = cxHashMapCreate(cxDefaultAllocator, CX_STORE_POINTERS, tags->size + 8);
114 CxIterator iter = cxListIterator(tags); 118 CxIterator iter = cxListIterator(tags);
115 cx_foreach(DavTag*, t, iter) { 119 cx_foreach(DavTag*, t, iter) {
116 cxMapPut(map, cx_hash_key_str(t->name), t); 120 cxMapPut(map, cx_hash_key_str(t->name), t);
117 } 121 }

mercurial