aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/strings.h
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-02-16 21:15:38 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-02-16 21:15:38 +0000
commite0188cab26f049c28e3e1b7eb87fa033d8ff42e2 (patch)
tree7fb3045870b8f450ba50ced66e044a620f2f4ed0 /include/asterisk/strings.h
parent397755f1ce65bb289736bb072cc82a785018dabb (diff)
Add some clarifying documentation to the ast_str_set and ast_str_append functions.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@246985 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/strings.h')
-rw-r--r--include/asterisk/strings.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/asterisk/strings.h b/include/asterisk/strings.h
index 0e904ac59..cb522aeb9 100644
--- a/include/asterisk/strings.h
+++ b/include/asterisk/strings.h
@@ -342,11 +342,16 @@ int ast_get_timeval(const char *src, struct timeval *tv, struct timeval _default
* ast_str_set_va(&buf, max_len, ap)
* ast_str_append_va(&buf, max_len, ap)
*
- * \param max_len The maximum allowed length, reallocating if needed.
+ * \param max_len The maximum allowed capacity of the ast_str. Note that
+ * if the value of max_len is less than the current capacity of the
+ * ast_str (as returned by ast_str_size), then the parameter is effectively
+ * ignored.
* 0 means unlimited, -1 means "at most the available space"
*
* \return All the functions return <0 in case of error, or the
- * length of the string added to the buffer otherwise.
+ * length of the string added to the buffer otherwise. Note that
+ * in most cases where an error is returned, characters ARE written
+ * to the ast_str.
*/
/*! \brief The descriptor of a dynamic string