aboutsummaryrefslogtreecommitdiff
path: root/strbuf.h
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-02-04 11:25:37 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-02-05 18:06:13 +0100
commitdc8474d9034d9281463bb69f7f7a922e3ea713ee (patch)
treec3b870ada88f7aaa48918c4eb8b5d865f2f82019 /strbuf.h
parentWork on propper memmory management for linked lists. (diff)
downloadcalp-dc8474d9034d9281463bb69f7f7a922e3ea713ee.tar.gz
calp-dc8474d9034d9281463bb69f7f7a922e3ea713ee.tar.xz
Normalize and improve INIT & FREE macros.
Diffstat (limited to 'strbuf.h')
-rw-r--r--strbuf.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/strbuf.h b/strbuf.h
index 19987dc3..8a4de030 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -20,12 +20,10 @@ typedef struct {
* Init strbuf to size of 0
* Doesnt't call malloc.
*/
-int CONSTRUCTOR_DECL(strbuf);
+INIT_F(strbuf);
-/*
- * Constructor
- */
-int CONSTRUCTOR_DECL(strbuf, size_t len);
+/* Constructor */
+INIT_F(strbuf, size_t len);
/*
* Like realloc, but for strbuf
@@ -36,7 +34,7 @@ int strbuf_realloc(strbuf* str, size_t len);
* Free's contents of str, but keeps str.
*/
// int strbuf_free(strbuf* str);
-int FREE_DECL(strbuf);
+FREE_F(strbuf);
/*
* Copy contents from src to dest.