From 77ade8d20906fe9ca2cf6788ff1e1437e0912868 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 1 Jun 2026 19:07:14 +0200 Subject: Second commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libnormalform_free_expression__.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 libnormalform_free_expression__.c (limited to 'libnormalform_free_expression__.c') 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 -- cgit v1.3.1