From de66bad21aa79394a5629c76a06383e4c7966ffa Mon Sep 17 00:00:00 2001
From: joey <joey.mrtg@gmail.com>
Date: Wed, 24 Nov 2021 10:17:06 +0100
Subject: [PATCH] Function destroy

---
 stack.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 stack.c

diff --git a/stack.c b/stack.c
new file mode 100644
index 0000000..17e97c4
--- /dev/null
+++ b/stack.c
@@ -0,0 +1,11 @@
+#include <stdio.h>
+#include <stdbool.h>
+#include <stdbool.h>
+#include "stack.h"
+
+void stack_destroy(stack *s){
+    free(s->data);
+    s->data = NULL;
+    s->capacity = -1;
+    s->top = -1;
+}
\ No newline at end of file
-- 
GitLab