diff options
Diffstat (limited to 'mysys/string.c')
-rw-r--r-- | mysys/string.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mysys/string.c b/mysys/string.c index e3a99580c29..1cbce7ca4e1 100644 --- a/mysys/string.c +++ b/mysys/string.c @@ -186,3 +186,15 @@ void dynstr_free(DYNAMIC_STRING *str) str->str=0; } } + + +/* Give over the control of the dynamic string to caller */ + +void dynstr_reassociate(DYNAMIC_STRING *str, char **ptr, size_t *length, + size_t *alloc_length) +{ + *ptr= str->str; + *length= str->length; + *alloc_length= str->max_length; + str->str=0; +} |