/* heap.h Pedro Flynn - pflynn@microsoftsucks.org */ #ifndef HEAP_H #define HEAP_H typedef struct _Heap{ int size; void (*destroy)(void*); int (*compare)(const void*,const void*); void** tree; } Heap; Heap* heap_create(void (*destroy)(void*),int (*compare)(const void*,const void*)); void heap_destroy(Heap* heap); int heap_insert(Heap* heap,const void* data); int heap_extract(Heap* heap,void** data); #define heap_size(heap) ((heap)->size) #endif