diff options
author | Patrick McDermott <pj@pehjota.net> | 2017-10-25 09:40:35 (EDT) |
---|---|---|
committer | Patrick McDermott <pj@pehjota.net> | 2017-10-25 09:40:35 (EDT) |
commit | 6f05aac3da050ce0fe3fd23605d0dd8faac36ac8 (patch) | |
tree | c63304cd1b14bb62e28abe6ca2a0ef8ae96be07e /src | |
parent | 1cdb6e30f0feebc06d4e8afcaefa9a8a900bdb89 (diff) | |
download | marquee-6f05aac3da050ce0fe3fd23605d0dd8faac36ac8.zip marquee-6f05aac3da050ce0fe3fd23605d0dd8faac36ac8.tar.gz marquee-6f05aac3da050ce0fe3fd23605d0dd8faac36ac8.tar.bz2 |
mq_tree_remove(): New macro
Diffstat (limited to 'src')
-rw-r--r-- | src/tree.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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) |