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 } |