aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_common.h')
-rw-r--r--src/include/gnunet_common.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index d7f7b76ff..7d23e6f9b 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -988,7 +988,8 @@ GNUNET_ntoh_double (double d);
988 * arr is important since size is the number of elements and 988 * arr is important since size is the number of elements and
989 * not the size in bytes 989 * not the size in bytes
990 * @param size the number of elements in the existing vector (number 990 * @param size the number of elements in the existing vector (number
991 * of elements to copy over) 991 * of elements to copy over), will be updated with the new
992 * array size
992 * @param tsize the target size for the resulting vector, use 0 to 993 * @param tsize the target size for the resulting vector, use 0 to
993 * free the vector (then, arr will be NULL afterwards). 994 * free the vector (then, arr will be NULL afterwards).
994 */ 995 */
@@ -996,8 +997,16 @@ GNUNET_ntoh_double (double d);
996 997
997/** 998/**
998 * @ingroup memory 999 * @ingroup memory
999 * Append an element to a list (growing the 1000 * Append an element to a list (growing the list by one).
1000 * list by one). 1001 *
1002 * @param arr base-pointer of the vector, may be NULL if size is 0;
1003 * will be updated to reflect the new address. The TYPE of
1004 * arr is important since size is the number of elements and
1005 * not the size in bytes
1006 * @param size the number of elements in the existing vector (number
1007 * of elements to copy over), will be updated with the new
1008 * array size
1009 * @param element the element that will be appended to the array
1001 */ 1010 */
1002#define GNUNET_array_append(arr,size,element) do { GNUNET_array_grow(arr,size,size+1); arr[size-1] = element; } while(0) 1011#define GNUNET_array_append(arr,size,element) do { GNUNET_array_grow(arr,size,size+1); arr[size-1] = element; } while(0)
1003 1012