docs/src/features.md

changeset 890
54565fd74e74
parent 854
fe0d69d72bcd
equal deleted inserted replaced
889:f549fd9fbd8f 890:54565fd74e74
276 enum cx_array_result cx_array_copy( 276 enum cx_array_result cx_array_copy(
277 void **target, 277 void **target,
278 size_t *size, 278 size_t *size,
279 size_t *capacity, // optional 279 size_t *capacity, // optional
280 size_t index, 280 size_t index,
281 void const *src, 281 const void *src,
282 size_t elem_size, 282 size_t elem_size,
283 size_t elem_count, 283 size_t elem_count,
284 struct cx_array_reallocator_s *reallocator // optional 284 struct cx_array_reallocator_s *reallocator // optional
285 ); 285 );
286 ``` 286 ```
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.

mercurial