summaryrefslogtreecommitdiffstats
path: root/src/ref.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ref.h')
-rw-r--r--src/ref.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ref.h b/src/ref.h
new file mode 100644
index 0000000..3a3936d
--- /dev/null
+++ b/src/ref.h
@@ -0,0 +1,16 @@
+#pragma once
+
+#include "list.h"
+
+struct ref {
+ void *data;
+
+ struct link link;
+};
+
+struct ref *ref_init(void *data);
+void ref_free(struct ref *ref);
+
+void refs_free(struct link *head);
+int refs_incl(struct link *head, void *data);
+void refs_rm(struct link *head, void *data);