diff options
author | Luigi Rizzo <rizzo@icir.org> | 2006-12-15 22:08:46 +0000 |
---|---|---|
committer | Luigi Rizzo <rizzo@icir.org> | 2006-12-15 22:08:46 +0000 |
commit | 961754d4b12da98e84aa43992ebb2c578d94ca30 (patch) | |
tree | 2229580e652fea2c03599c4c5bd2a1a3eb38ef00 /include/asterisk/utils.h | |
parent | 4a0738a665ccc856d70ad328bf28a7bd5a2d7deb (diff) |
move the dynamic string support in a better place i.e. string.h
While doing this, add a bit of documentation, and slightly
extend the functionality as follows:
+ a max_len of -1 means that we take whatever the current size
is, and never try to extend the buffer;
+ add support for alloca()-ted dynamic strings, which is very
useful for all cases where we do an ast_build_string() now.
Next step is to simplify the interface by using shorter names
(e.g. ast_str as a prefix) and removing the _thread variant
of the functions by saving the threadstorage reference into
the struct ast_str. This can be done by overloading the
'type' field.
Finally, I will do my best to remove the convoluted interface
that results from trying to support platforms without va_copy().
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/utils.h')
-rw-r--r-- | include/asterisk/utils.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h index 3fb817980..81637e50b 100644 --- a/include/asterisk/utils.h +++ b/include/asterisk/utils.h @@ -32,10 +32,10 @@ #include <arpa/inet.h> /* we want to override inet_ntoa */ #include <netdb.h> #include <limits.h> +#include <string.h> #include "asterisk/lock.h" #include "asterisk/time.h" -#include "asterisk/strings.h" #include "asterisk/logger.h" #include "asterisk/compiler.h" @@ -540,4 +540,5 @@ int _ast_vasprintf(char **ret, const char *file, int lineno, const char *func, c */ void ast_enable_packet_fragmentation(int sock); +#include "asterisk/strings.h" #endif /* _ASTERISK_UTILS_H */ |