[asterisk-commits] russell: branch russell/heap r175767 - in /team/russell/heap: include/asteris...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Feb 13 21:27:43 CST 2009
Author: russell
Date: Fri Feb 13 21:27:43 2009
New Revision: 175767
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=175767
Log:
Add an API call for peeking at the top node
Modified:
team/russell/heap/include/asterisk/heap.h
team/russell/heap/main/heap.c
Modified: team/russell/heap/include/asterisk/heap.h
URL: http://svn.digium.com/svn-view/asterisk/team/russell/heap/include/asterisk/heap.h?view=diff&rev=175767&r1=175766&r2=175767
==============================================================================
--- team/russell/heap/include/asterisk/heap.h (original)
+++ team/russell/heap/include/asterisk/heap.h Fri Feb 13 21:27:43 2009
@@ -36,6 +36,8 @@
const void *ast_heap_pop(struct ast_heap *h);
+const void *ast_heap_peek(struct ast_heap *h);
+
void ast_heap_print(struct ast_heap *h, int fd);
int ast_heap_verify(struct ast_heap *h);
Modified: team/russell/heap/main/heap.c
URL: http://svn.digium.com/svn-view/asterisk/team/russell/heap/main/heap.c?view=diff&rev=175767&r1=175766&r2=175767
==============================================================================
--- team/russell/heap/main/heap.c (original)
+++ team/russell/heap/main/heap.c Fri Feb 13 21:27:43 2009
@@ -219,3 +219,13 @@
return ret;
}
+
+const void *ast_heap_peek(struct ast_heap *h)
+{
+ if (!h->cur_len) {
+ return NULL;
+ }
+
+ return heap_get(h, 1);
+}
+
More information about the asterisk-commits
mailing list