/*
- * prio_heap.c
- *
* Static-sized priority heap containing pointers. Based on CLRS,
* chapter 6.
*
* SOFTWARE.
*/
-#include <babeltrace/prio_heap.h>
+#include <babeltrace/prio-heap-internal.h>
#include <babeltrace/babeltrace-internal.h>
+#include <babeltrace/assert-internal.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
-#include <assert.h>
-
-#ifndef max_t
-#define max_t(type, a, b) \
- ((type) (a) > (type) (b) ? (type) (a) : (type) (b))
-#endif
#ifdef DEBUG_HEAP
void check_heap(const struct ptr_heap *heap)
return;
for (i = 1; i < heap->len; i++)
- assert(!heap->gt(heap->ptrs[i], heap->ptrs[0]));
+ BT_ASSERT(!heap->gt(heap->ptrs[i], heap->ptrs[0]));
}
#endif