aboutsummaryrefslogtreecommitdiff
path: root/strbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'strbuf.c')
-rw-r--r--strbuf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/strbuf.c b/strbuf.c
index 37b0cf3e..6ed62c51 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -94,6 +94,14 @@ strbuf& strbuf::operator=(strbuf& other) {
return *this;
}
+bool strbuf::operator==(strbuf& other) {
+ return strbuf_cmp(this, &other);
+}
+
+bool strbuf::operator==(const char* other) {
+ return strbuf_c(this, other);
+}
+
int strbuf_cmp(strbuf* a, strbuf* b) {
if (a == NULL || a->alloc == 0 ||
b == NULL || b->alloc == 0)