aboutsummaryrefslogtreecommitdiff
path: root/vcal.h
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-02-04 00:36:57 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-02-04 00:36:57 +0100
commit2c2bdb8b66e386e14b5cc1a35abfbf242dcf2018 (patch)
tree7f640c7845bd26823b8d6108b4f554bf5b6c9d97 /vcal.h
parentAdd linked list generic type. (diff)
downloadcalp-2c2bdb8b66e386e14b5cc1a35abfbf242dcf2018.tar.gz
calp-2c2bdb8b66e386e14b5cc1a35abfbf242dcf2018.tar.xz
Work on propper memmory management for linked lists.
Diffstat (limited to 'vcal.h')
-rw-r--r--vcal.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/vcal.h b/vcal.h
index 91eed471..a5144992 100644
--- a/vcal.h
+++ b/vcal.h
@@ -28,6 +28,9 @@ typedef struct {
int CONSTRUCTOR_DECL(content_line);
int CONSTRUCTOR_DECL(content_line, int keylen, int vallen);
+int RESOLVE(content_line)
+ (content_line** orig, content_line* new);
+
#define TYPE content_line
// #include "hash.h"
#include "trie.h"
@@ -65,6 +68,13 @@ int free_vcalendar (vcalendar* cal);
*/
int push_event(vcalendar* cal, vevent* ev);
+/*
+ * NOTE
+ * these create a very basic garbage collector. It shouldn't be used,
+ * but is useful for finding lost memmory during debugging.
+ * TODO
+ * remove it.
+ */
extern content_line** clines;
extern int cline_ptr;