7#ifndef VERIBLOCK_POP_CPP_C_ENTITIES_ARRAY_H 
    8#define VERIBLOCK_POP_CPP_C_ENTITIES_ARRAY_H 
   18#define POP_DECLARE_ARRAY(type, suffix)                             \ 
   19  struct __pop_array_##suffix {                                     \ 
   23  typedef struct __pop_array_##suffix pop_array_##suffix##_t;       \ 
   24  inline type pop_array_##suffix##_at(pop_array_##suffix##_t* self, \ 
   26    if (i > self->size) {                                           \ 
   27      assert(0 && "index our of range");                            \
 
   29    return self->data[i];                                           \
 
   31  pop_array_##suffix##_t pop_array_##suffix##_new(size_t size);     \
 
   32  void pop_array_##suffix##_free(pop_array_##suffix##_t* self);
 
   34#define POP_ARRAY_NAME(suffix) pop_array_##suffix##_t 
   36#define POP_ARRAY_FREE_SIGNATURE(suffix) \ 
   37  void pop_array_##suffix##_free(pop_array_##suffix##_t* self) 
   39#define POP_ARRAY_NEW_SIGNATURE(suffix) \ 
   40  pop_array_##suffix##_t pop_array_##suffix##_new(size_t size) 
   43POP_DECLARE_ARRAY(uint8_t, u8);
 
   44POP_DECLARE_ARRAY(uint32_t, u32);
 
   45POP_DECLARE_ARRAY(
double, 
double);
 
   46POP_DECLARE_ARRAY(POP_ARRAY_NAME(u8), array_u8);
 
   47POP_DECLARE_ARRAY(
char, 
string);