aboutsummaryrefslogtreecommitdiffstats
path: root/libnormalform_free_expression__.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnormalform_free_expression__.c')
-rw-r--r--libnormalform_free_expression__.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/libnormalform_free_expression__.c b/libnormalform_free_expression__.c
new file mode 100644
index 0000000..d9f1a47
--- /dev/null
+++ b/libnormalform_free_expression__.c
@@ -0,0 +1,30 @@
+/* See LICENSE file for copyright and license details. */
+#include "common.h"
+#ifndef TEST
+
+
+void
+(libnormalform_free_expression__)(struct expression *this)
+{
+ if (!this || --this->refcount)
+ return;
+ if (this->terms) {
+ while (this->nterms)
+ libnormalform_free_expression__(this->terms[--this->nterms]);
+ free(this->terms);
+ }
+ free(this);
+}
+
+
+#else
+
+
+CONST int
+main(void)
+{
+ return 0; /* indirectly tested */
+}
+
+
+#endif