diff options
Diffstat (limited to 'libs/libcurl/src/dynbuf.c')
| -rw-r--r-- | libs/libcurl/src/dynbuf.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libs/libcurl/src/dynbuf.c b/libs/libcurl/src/dynbuf.c index f50fb055c1..2b65b76336 100644 --- a/libs/libcurl/src/dynbuf.c +++ b/libs/libcurl/src/dynbuf.c @@ -244,6 +244,18 @@ char *Curl_dyn_ptr(const struct dynbuf *s) return s->bufr;
}
+char *Curl_dyn_take(struct dynbuf *s, size_t *plen)
+{
+ char *ptr = s->bufr;
+ DEBUGASSERT(s);
+ DEBUGASSERT(s->init == DYNINIT);
+ *plen = s->leng;
+ s->bufr = NULL;
+ s->leng = 0;
+ s->allc = 0;
+ return ptr;
+}
+
/*
* Returns an unsigned pointer to the buffer.
*/
|
