From f46bdfdbb7635adb76421ff330c2774516cd6290 Mon Sep 17 00:00:00 2001
From: Martin Stjernholm <mast@lysator.liu.se>
Date: Mon, 6 Apr 2009 02:29:41 +0200
Subject: [PATCH] Added rbstack_do_free, a function equivalent to RBSTACK_FREE.

---
 src/rbtree.c     | 5 +++++
 src/rbtree_low.h | 1 +
 2 files changed, 6 insertions(+)

diff --git a/src/rbtree.c b/src/rbtree.c
index e34c369199..8f6e06e70b 100644
--- a/src/rbtree.c
+++ b/src/rbtree.c
@@ -88,6 +88,11 @@ void rbstack_low_free (struct rbstack_ptr *rbstack)
   rbstack->ssp = 0;
 }
 
+void rbstack_do_free (struct rbstack_ptr *rbstack_ptr)
+{
+  RBSTACK_FREE (*rbstack_ptr);
+}
+
 /* Inserts the given node at *pos and advances *pos. *top is the top
  * of the stack, which also is advanced to keep track of the top. */
 void rbstack_insert (struct rbstack_ptr *top, struct rbstack_ptr *pos,
diff --git a/src/rbtree_low.h b/src/rbtree_low.h
index 5ad43cf395..626d0468e4 100644
--- a/src/rbtree_low.h
+++ b/src/rbtree_low.h
@@ -46,6 +46,7 @@ void rbstack_low_pop (struct rbstack_ptr *rbstack);
 void rbstack_low_up (struct rbstack_ptr *rbstack);
 void rbstack_low_up_to_root (struct rbstack_ptr *rbstack);
 void rbstack_low_free (struct rbstack_ptr *rbstack);
+void rbstack_do_free (struct rbstack_ptr *rbstack);
 void rbstack_insert (struct rbstack_ptr *top, struct rbstack_ptr *pos,
 		     struct rb_node_hdr *node);
 void rbstack_assign (struct rbstack_ptr *target, struct rbstack_ptr *source);
-- 
GitLab