From: Florian Forster Date: Mon, 12 Jul 2010 08:34:59 +0000 (+0200) Subject: src/utils_array.h: Note that the parameter may / must be freed by the caller. X-Git-Tag: v4.0.0~107 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=0eb8b602c5dc491fd734090ae97ca6aab3ea7397;p=collection4.git src/utils_array.h: Note that the parameter may / must be freed by the caller. --- diff --git a/src/utils_array.h b/src/utils_array.h index da7cc31..252c8a7 100644 --- a/src/utils_array.h +++ b/src/utils_array.h @@ -30,10 +30,14 @@ typedef struct str_array_s str_array_t; str_array_t *array_create (void); void array_destroy (str_array_t *a); +/* Appends a string to the array. The string is duplicated, so the original + * string may / must be freed. */ int array_append (str_array_t *a, const char *entry); int array_append_format (str_array_t *a, const char *format, ...) __attribute__((format(printf,2,3))); +/* Prepends a string to the array. The string is duplicated, so the original + * string may / must be freed. */ int array_prepend (str_array_t *a, const char *entry); int array_prepend_format (str_array_t *a, const char *format, ...) __attribute__((format(printf,2,3)));