From 967be9e750221ab2ab783f95df79bb26d290a45e Mon Sep 17 00:00:00 2001 From: Martial Simon Date: Mon, 15 Sep 2025 01:07:58 +0200 Subject: add: added projects --- bittorrent/mbtstr/src/dtor.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 bittorrent/mbtstr/src/dtor.c (limited to 'bittorrent/mbtstr/src/dtor.c') diff --git a/bittorrent/mbtstr/src/dtor.c b/bittorrent/mbtstr/src/dtor.c new file mode 100644 index 0000000..af35c9e --- /dev/null +++ b/bittorrent/mbtstr/src/dtor.c @@ -0,0 +1,15 @@ +#include +#include + +#include "mbtstr/str.h" + +void mbt_str_dtor(struct mbt_str *str) +{ + if (str->data != NULL) + { + free(str->data); + str->data = NULL; + } + str->size = 0; + str->capacity = 0; +} -- cgit v1.2.3