summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tree.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tree.h b/src/tree.h
index 656b2d4..6c4731a 100644
--- a/src/tree.h
+++ b/src/tree.h
@@ -63,6 +63,11 @@ mq_tree_remove_allocated(MqTree *node);
mq_tree_append_child_allocated(g_new0(MqTree, 1), parent, data)
#define mq_tree_append_sibling(sibling, data) \
mq_tree_append_sibling_allocated(g_new0(MqTree, 1), sibling, data)
+#define mq_tree_remove(node) \
+ G_STMT_START { \
+ mq_tree_remove_allocated(node); \
+ g_free(node); \
+ } G_STMT_END
#define mq_tree_size(node) ((node) ? (((MqTree *) (node))->size) : -1)
#define mq_tree_position(node) ((node) ? (((MqTree *) (node))->position) : -1)