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 */ |