g_slice_free1 (sizeof (*heap), heap);
}
}
+
+struct rspamd_min_heap_elt*
+rspamd_min_heap_index (struct rspamd_min_heap *heap, guint idx)
+{
+ g_assert (heap != NULL);
+ g_assert (idx >= 0 && idx < heap->ar->len);
+
+ return g_ptr_array_index (heap->ar, idx);
+}
*/
void rspamd_min_heap_destroy (struct rspamd_min_heap *heap);
+/**
+ * Returns element from the heap with the specified index
+ * @param heap
+ * @param idx
+ * @return
+ */
+struct rspamd_min_heap_elt* rspamd_min_heap_index (struct rspamd_min_heap *heap,
+ guint idx);
+
#endif /* SRC_LIBUTIL_HEAP_H_ */