1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
409 B
C

/*
* grow.h: declaration of generic growing array
*/
#ifndef GROW_H
#define GROW_H
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
struct grow {
void **arr;
uint64_t elems;
uint64_t alloc;
uint64_t active_elems;
bool dealloc;
};
struct grow *grow_init(bool dealloc);
bool grow_push (void *val, struct grow *g);
void *grow_pop (struct grow *g);
void grow_drop (struct grow *g);
#endif