diff options
| author | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:07:58 +0200 |
|---|---|---|
| committer | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:07:58 +0200 |
| commit | 967be9e750221ab2ab783f95df79bb26d290a45e (patch) | |
| tree | 6802900a5e975f9f68b169f0f503f040056d6952 /bittorrent/mbtstr/src/init.c | |
Diffstat (limited to 'bittorrent/mbtstr/src/init.c')
| -rw-r--r-- | bittorrent/mbtstr/src/init.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bittorrent/mbtstr/src/init.c b/bittorrent/mbtstr/src/init.c new file mode 100644 index 0000000..bf8a107 --- /dev/null +++ b/bittorrent/mbtstr/src/init.c @@ -0,0 +1,12 @@ +#include <stdbool.h> +#include <stdlib.h> + +#include "mbtstr/str.h" + +struct mbt_str *mbt_str_init(size_t capacity) +{ + struct mbt_str *s = calloc(sizeof(struct mbt_str), 1); + if (!mbt_str_ctor(s, capacity)) + return NULL; + return s; +} |
