aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavier.delcampo@orain.io>2020-09-03 14:42:18 +0200
committerXavier Del Campo Romero <xavier.delcampo@orain.io>2020-09-03 14:43:02 +0200
commit134ebfa751bf8083e36f0707b32a78cf2ba7ac5f (patch)
treefe5e7ac61f3199f083ae1e967d7f20e0fd5072ba /include
parent9bf483cde20a67cabd4a56f55f4b96b306690e4e (diff)
downloaddynstr-134ebfa751bf8083e36f0707b32a78cf2ba7ac5f.tar.gz
Call dynstr_init on dynstr_free
Diffstat (limited to 'include')
-rw-r--r--include/dynstr.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/dynstr.h b/include/dynstr.h
index 7283de5..d667e03 100644
--- a/include/dynstr.h
+++ b/include/dynstr.h
@@ -131,9 +131,11 @@ enum dynstr_err dynstr_dup(struct dynstr *dst, const struct dynstr *src);
/**
* This function frees memory used by the dynamic string.
* @param d Dynamic string to be freed.
- * @attention Attempting to call this function on an uninitialized or empty
- * instance is undefined behaviour.
- * @attention Parameters inside the struct are reset once memory is freed.
+ * @note This function does nothing on empty, initialized instances.
+ * @attention Calling this function on an uninitialized instance leads to
+ * undefined behaviour.
+ * @attention Once memory is freed, @ref dynstr_init is called so it can be
+ * used again.
*/
void dynstr_free(struct dynstr *d);