diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-02-04 11:25:37 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-02-05 18:06:13 +0100 |
commit | dc8474d9034d9281463bb69f7f7a922e3ea713ee (patch) | |
tree | c3b870ada88f7aaa48918c4eb8b5d865f2f82019 /strbuf.h | |
parent | Work on propper memmory management for linked lists. (diff) | |
download | calp-dc8474d9034d9281463bb69f7f7a922e3ea713ee.tar.gz calp-dc8474d9034d9281463bb69f7f7a922e3ea713ee.tar.xz |
Normalize and improve INIT & FREE macros.
Diffstat (limited to 'strbuf.h')
-rw-r--r-- | strbuf.h | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -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. |