aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/strings.h
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-28 19:41:18 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-28 19:41:18 +0000
commit5d6dc7ab735b8701ffa72115e0f19619f24d3908 (patch)
treee0ecc6c53be20cead23b7d702f6f9a18f83cb22e /include/asterisk/strings.h
parent19dd1526bcf6b6042f2d5a2280e98da9e3ff6e4a (diff)
Remove the ill-advised ast_restrdupa API call and related structures
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72492 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/strings.h')
-rw-r--r--include/asterisk/strings.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/include/asterisk/strings.h b/include/asterisk/strings.h
index ab610982c..d1799de51 100644
--- a/include/asterisk/strings.h
+++ b/include/asterisk/strings.h
@@ -244,24 +244,6 @@ void ast_join(char *s, size_t len, char * const w[]);
*/
int ast_get_time_t(const char *src, time_t *dst, time_t _default, int *consumed);
-/* The realloca lets us ast_restrdupa(), but you can't mix any other ast_strdup calls! */
-
-struct ast_realloca {
- char *ptr;
- int alloclen;
-};
-
-#define ast_restrdupa(ra, s) \
- ({ \
- if ((ra)->ptr && strlen(s) + 1 < (ra)->alloclen) { \
- strcpy((ra)->ptr, s); \
- } else { \
- (ra)->ptr = alloca(strlen(s) + 1 - (ra)->alloclen); \
- if ((ra)->ptr) (ra)->alloclen = strlen(s) + 1; \
- } \
- (ra)->ptr; \
- })
-
/*!
* Support for dynamic strings.
*