diff options
| author | krasimir <krasimir@chalmers.se> | 2017-04-13 12:55:29 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2017-04-13 12:55:29 +0000 |
| commit | df6c2f3f17c9ab410721f7974cfed347657b633e (patch) | |
| tree | 54c3a6fdfeeba706123574908dc30deb9b96cf2d /src/runtime/c/gu/string.c | |
| parent | 2551ab740b57053e8594443b03bf7b6d446ce6cf (diff) | |
add gu_string_buf_data and gu_string_buf_length in libgu
Diffstat (limited to 'src/runtime/c/gu/string.c')
| -rw-r--r-- | src/runtime/c/gu/string.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/runtime/c/gu/string.c b/src/runtime/c/gu/string.c index 3e754a72c..386eb7a6f 100644 --- a/src/runtime/c/gu/string.c +++ b/src/runtime/c/gu/string.c @@ -82,6 +82,20 @@ gu_string_buf_freeze(GuStringBuf* sb, GuPool* pool) return p; } +char* +gu_string_buf_data(GuStringBuf* sb) +{ + gu_out_flush(sb->out, NULL); + return gu_buf_data(sb->buf); +} + +size_t +gu_string_buf_length(GuStringBuf* sb) +{ + gu_out_flush(sb->out, NULL); + return gu_buf_length(sb->buf); +} + void gu_string_buf_flush(GuStringBuf* sb) { |
