src/cx/array_list.h

changeset 834
04c53b3c8378
parent 832
97df2e4c68fb
child 843
7d2959b7fff2
equal deleted inserted replaced
833:5c926801f052 834:04c53b3c8378
52 /** 52 /**
53 * Declares variables for an array that can be used with the convenience macros. 53 * Declares variables for an array that can be used with the convenience macros.
54 * 54 *
55 * @see cx_array_simple_add() 55 * @see cx_array_simple_add()
56 * @see cx_array_simple_copy() 56 * @see cx_array_simple_copy()
57 */ 57 * @see cx_array_initialize()
58 #define cx_array_declare(type, name) \ 58 */
59 #define CX_ARRAY_DECLARE(type, name) \
59 type * name; \ 60 type * name; \
60 size_t name##_size; \ 61 size_t name##_size; \
61 size_t name##_capacity; 62 size_t name##_capacity;
62 63
63 /** 64 /**
64 * Initializes an array declared with cx_array_declare(). 65 * Initializes an array declared with CX_ARRAY_DECLARE().
65 * 66 *
66 * The memory for the array is allocated with stdlib malloc(). 67 * The memory for the array is allocated with stdlib malloc().
67 * @param array the array 68 * @param array the array
68 * @param capacity the initial capacity 69 * @param capacity the initial capacity
69 */ 70 */

mercurial