328 When you implement this method, you are either supposed to invoke the destructors and return `NULL`, |
328 When you implement this method, you are either supposed to invoke the destructors and return `NULL`, |
329 or just remove the element from the map and return it. |
329 or just remove the element from the map and return it. |
330 |
330 |
331 Secondly, the iterator method is a bit more complete. The signature is as follows: |
331 Secondly, the iterator method is a bit more complete. The signature is as follows: |
332 ```c |
332 ```c |
333 CxIterator (*iterator)(CxMap const *map, enum cx_map_iterator_type type); |
333 CxIterator (*iterator)(const CxMap *map, enum cx_map_iterator_type type); |
334 ``` |
334 ``` |
335 There are three map iterator types: for values, for keys, for pairs. |
335 There are three map iterator types: for values, for keys, for pairs. |
336 Depending on the iterator type requested, you need to create an iterator with the correct methods that |
336 Depending on the iterator type requested, you need to create an iterator with the correct methods that |
337 return the requested thing. |
337 return the requested thing. |
338 There are no automatic checks to enforce this - it's completely up to you. |
338 There are no automatic checks to enforce this - it's completely up to you. |