aboutsummaryrefslogtreecommitdiff
path: root/strbuf.c
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-01-22 11:42:58 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-01-22 11:42:58 +0100
commitebe5c7e428b57dca758b1b3a1d8b7d4b423b19a9 (patch)
treebf97a4ba3a05c24ae1ec176f42656ce1608ee8d1 /strbuf.c
parentAdd very simple err header. (diff)
downloadcalp-ebe5c7e428b57dca758b1b3a1d8b7d4b423b19a9.tar.gz
calp-ebe5c7e428b57dca758b1b3a1d8b7d4b423b19a9.tar.xz
Start using trie's instead of hash-maps.
Diffstat (limited to 'strbuf.c')
-rw-r--r--strbuf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/strbuf.c b/strbuf.c
index 7f61313b..f5680a22 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -101,12 +101,13 @@ int strbuf_reset(strbuf* s)
int strbuf_init_copy(strbuf* dest, strbuf* src) {
#ifdef SAFE_STR
if (dest->alloc != 0) {
+ printf("%lu ", dest->alloc);
ERR("Dest already allocated");
return 1;
}
#endif
- strbuf_init_1(dest, src->len + 1);
+ CONSTRUCT(strbuf, dest, src->len + 1);
strbuf_copy(dest, src);
return 0;