aboutsummaryrefslogtreecommitdiff
path: root/buffer.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-12-31 14:10:11 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-12-31 14:10:11 +0100
commite6761ecfdf9f7a83c8f5db433b2ab0f9d579cdd5 (patch)
tree9865315222864c2372b264aa54415d0c01a26405 /buffer.h
parent799183a57a925c3adaf15e0c5b28bfa230472573 (diff)
downloadvis-e6761ecfdf9f7a83c8f5db433b2ab0f9d579cdd5.tar.gz
vis-e6761ecfdf9f7a83c8f5db433b2ab0f9d579cdd5.tar.xz
buffer: implement buffer_move
Diffstat (limited to 'buffer.h')
-rw-r--r--buffer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/buffer.h b/buffer.h
index 41c2532..1bb20d7 100644
--- a/buffer.h
+++ b/buffer.h
@@ -57,5 +57,8 @@ size_t buffer_capacity(Buffer*);
const char *buffer_content0(Buffer*);
/* pointer to buffer data, might be NULL if empty, might not be NUL terminated */
const char *buffer_content(Buffer*);
+/* steal underlying buffer data, caller is responsible to free(3) it,
+ * similar to move semantics in some programming languages */
+char *buffer_move(Buffer*);
#endif