#include <stdlib.h>
Go to the source code of this file.
|
void | yac_realloc_array (void **array, size_t elem_size, size_t *curr_array_size, size_t requested_size) |
|
◆ ENSURE_ARRAY_SIZE
#define ENSURE_ARRAY_SIZE |
( |
| arrayp, |
|
|
| curr_array_size, |
|
|
| req_size ) |
Value: do { \
if ((size_t)(req_size) > (size_t)(curr_array_size)) \
{ \
size_t casize = (curr_array_size); \
\
yac_realloc_array((void **)&(arrayp), sizeof(*(arrayp)), &casize, \
(req_size)); \
(curr_array_size) = casize; \
} \
} \
while(0)
Definition at line 14 of file ensure_array_size.h.
◆ ENSURE_BYTE_ARRAY_SIZE
#define ENSURE_BYTE_ARRAY_SIZE |
( |
| arrayp, |
|
|
| curr_array_size, |
|
|
| req_size ) |
Value: do { \
if ((size_t)(req_size) > (size_t)(curr_array_size)) \
{ \
size_t casize = (curr_array_size); \
\
yac_realloc_array(&(arrayp), 1, &casize, (req_size)); \
\
(curr_array_size) = casize; \
} \
} \
while(0)
Definition at line 27 of file ensure_array_size.h.
◆ yac_realloc_array()
void yac_realloc_array |
( |
void ** | array, |
|
|
size_t | elem_size, |
|
|
size_t * | curr_array_size, |
|
|
size_t | requested_size ) |