~ubuntu-branches/ubuntu/utopic/mtbl/utopic-proposed

« back to all changes in this revision

Viewing changes to libmy/heap.h

  • Committer: Package Import Robot
  • Author(s): Robert S. Edmonds
  • Date: 2014-01-21 16:30:22 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20140121163022-g1077ma2csn1gne8
Tags: 0.4-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef MY_HEAP_H
 
2
#define MY_HEAP_H
 
3
 
 
4
struct heap;
 
5
 
 
6
typedef int (*heap_compare_func)(const void *a, const void *b);
 
7
 
 
8
struct heap *heap_init(heap_compare_func);
 
9
void heap_destroy(struct heap **);
 
10
void heap_push(struct heap *, void *);
 
11
void *heap_pop(struct heap *);
 
12
void *heap_replace(struct heap *, void *);
 
13
void *heap_peek(struct heap *);
 
14
void *heap_get(struct heap *, size_t);
 
15
size_t heap_size(struct heap *);
 
16
 
 
17
#endif /* MY_HEAP_H */