static inline int array_ensure_allocated(array_t* array, int index)

{

    if((index + 1) * array->item_size > array->size) {

        int new_size = (index + 32) * array->item_size;

        array->pointer = g_realloc(array->pointer, new_size);

        if (!array->pointer)

            return -1;


        array->size = new_size;

        array->next = index + 1;

    }



    return 0;

}
static inline int array_ensure_allocated(array_t* array, int index)

{

    if((index + 1) * array->item_size > array->size) {

        int new_size = (index + 32) * array->item_size;

        array->pointer = g_realloc(array->pointer, new_size);

        if (!array->pointer)

            return -1;


        array->size = new_size;

        array->next = index + 1;

    }



    return 0;

}
static inline int FUNC_0(array_t* VAR_0, int VAR_1)

{

    if((VAR_1 + 1) * VAR_0->item_size > VAR_0->size) {

        int VAR_2 = (VAR_1 + 32) * VAR_0->item_size;

        VAR_0->pointer = g_realloc(VAR_0->pointer, VAR_2);

        if (!VAR_0->pointer)

            return -1;


        VAR_0->size = VAR_2;

        VAR_0->next = VAR_1 + 1;

    }



    return 0;

}
static inline int FUNC_0(array_t* VAR_0, int VAR_1)
{ if((VAR_1 + 1) * VAR_0->item_size > VAR_0->size) { int VAR_2 = (VAR_1 + 32) * VAR_0->item_size; VAR_0->pointer = g_realloc(VAR_0->pointer, VAR_2); if (!VAR_0->pointer)
return -1; VAR_0->size = VAR_2; VAR_0->next = VAR_1 + 1; } return 0; }