gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] 31/45: improve documentation about the GNUNET_arra


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 31/45: improve documentation about the GNUNET_array_append and GNUNET_array_grow macros
Date: Sun, 31 Dec 2017 00:37:18 +0100

This is an automated email from the git hooks/post-receive script.

lurchi pushed a commit to branch master
in repository gnunet.

commit 863211feb62023e37cad3f57cc72b2bb30262383
Author: lurchi <address@hidden>
AuthorDate: Mon Aug 21 01:09:15 2017 +0200

    improve documentation about the GNUNET_array_append and GNUNET_array_grow 
macros
---
 src/include/gnunet_common.h | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index bda011fb2..950f5cc34 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -973,7 +973,8 @@ GNUNET_ntoh_double (double d);
  *        arr is important since size is the number of elements and
  *        not the size in bytes
  * @param size the number of elements in the existing vector (number
- *        of elements to copy over)
+ *        of elements to copy over), will be updated with the new 
+ *        array size
  * @param tsize the target size for the resulting vector, use 0 to
  *        free the vector (then, arr will be NULL afterwards).
  */
@@ -981,8 +982,16 @@ GNUNET_ntoh_double (double d);
 
 /**
  * @ingroup memory
- * Append an element to a list (growing the
- * list by one).
+ * Append an element to a list (growing the list by one).
+ * 
+ * @param arr base-pointer of the vector, may be NULL if size is 0;
+ *        will be updated to reflect the new address. The TYPE of
+ *        arr is important since size is the number of elements and
+ *        not the size in bytes
+ * @param size the number of elements in the existing vector (number
+ *        of elements to copy over), will be updated with the new 
+ *        array size
+ * @param element the element that will be appended to the array
  */
 #define GNUNET_array_append(arr,size,element) do { 
GNUNET_array_grow(arr,size,size+1); arr[size-1] = element; } while(0)
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]