[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r14971 - in gnunet/src: include util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r14971 - in gnunet/src: include util |
Date: |
Wed, 13 Apr 2011 01:32:17 +0200 |
Author: brodski
Date: 2011-04-13 01:32:17 +0200 (Wed, 13 Apr 2011)
New Revision: 14971
Modified:
gnunet/src/include/gnunet_container_lib.h
gnunet/src/util/container_heap.c
Log:
Added GNUNET_CONTAINER_node_get_cost
Modified: gnunet/src/include/gnunet_container_lib.h
===================================================================
--- gnunet/src/include/gnunet_container_lib.h 2011-04-12 17:28:40 UTC (rev
14970)
+++ gnunet/src/include/gnunet_container_lib.h 2011-04-12 23:32:17 UTC (rev
14971)
@@ -919,6 +919,15 @@
/**
+ * Get the current cost of the node
+ *
+ * @param node the node to get the cost of
+ * @return cost of the node
+ */
+GNUNET_CONTAINER_HeapCostType
+GNUNET_CONTAINER_node_get_cost (const struct GNUNET_CONTAINER_HeapNode *node);
+
+/**
* Iterator for heap
*
* @param cls closure
Modified: gnunet/src/util/container_heap.c
===================================================================
--- gnunet/src/util/container_heap.c 2011-04-12 17:28:40 UTC (rev 14970)
+++ gnunet/src/util/container_heap.c 2011-04-12 23:32:17 UTC (rev 14971)
@@ -188,6 +188,18 @@
/**
+ * Get the current cost of the node
+ *
+ * @param node the node to get the cost of
+ * @return cost of the node
+ */
+GNUNET_CONTAINER_HeapCostType
+GNUNET_CONTAINER_node_get_cost (const struct GNUNET_CONTAINER_HeapNode *node)
+{
+ return node->cost;
+}
+
+/**
* Iterate over the children of the given node.
*
* @param heap argument to give to iterator
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r14971 - in gnunet/src: include util,
gnunet <=