aboutsummaryrefslogtreecommitdiff
path: root/src/buffer.hpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-06-19 19:01:28 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-06-19 19:01:28 -0400
commit04c25efe112e374facaf1bc8b58bbdb6999a39e3 (patch)
tree66a70b185ad8e44a69c8be27dd7dbc23425b040c /src/buffer.hpp
parent4ffab5b85f03f63a7e724698482f8497cacc7212 (diff)
parent381c6a38b145665a22440f7aa816f0ddd9b70ee5 (diff)
downloadzig-04c25efe112e374facaf1bc8b58bbdb6999a39e3.tar.gz
zig-04c25efe112e374facaf1bc8b58bbdb6999a39e3.zip
Merge remote-tracking branch 'origin/master' into copy-elision-3
Diffstat (limited to 'src/buffer.hpp')
-rw-r--r--src/buffer.hpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/buffer.hpp b/src/buffer.hpp
index 082d584e2c..d4a911fc21 100644
--- a/src/buffer.hpp
+++ b/src/buffer.hpp
@@ -27,11 +27,13 @@ Buf *buf_sprintf(const char *format, ...)
Buf *buf_vprintf(const char *format, va_list ap);
static inline size_t buf_len(Buf *buf) {
+ assert(buf);
assert(buf->list.length);
return buf->list.length - 1;
}
static inline char *buf_ptr(Buf *buf) {
+ assert(buf);
assert(buf->list.length);
return buf->list.items;
}