src/cx/map.h

changeset 993
b642eca4b956
parent 992
14ca894190fd
equal deleted inserted replaced
992:14ca894190fd 993:b642eca4b956
88 struct cx_map_class_s { 88 struct cx_map_class_s {
89 /** 89 /**
90 * Deallocates the entire memory. 90 * Deallocates the entire memory.
91 */ 91 */
92 cx_attr_nonnull 92 cx_attr_nonnull
93 void (*destructor)(struct cx_map_s *map); 93 void (*deallocate)(struct cx_map_s *map);
94 94
95 /** 95 /**
96 * Removes all elements. 96 * Removes all elements.
97 */ 97 */
98 cx_attr_nonnull 98 cx_attr_nonnull
202 } 202 }
203 203
204 /** 204 /**
205 * Deallocates the memory of the specified map. 205 * Deallocates the memory of the specified map.
206 * 206 *
207 * @param map the map to be destroyed 207 * @param map the map to be freed
208 */ 208 */
209 static inline void cxMapDestroy(CxMap *map) { 209 static inline void cxMapFree(CxMap *map) {
210 if (map == NULL) return; 210 if (map == NULL) return;
211 map->cl->destructor(map); 211 map->cl->deallocate(map);
212 } 212 }
213 213
214 214
215 /** 215 /**
216 * Clears a map by removing all elements. 216 * Clears a map by removing all elements.

mercurial