aboutsummaryrefslogtreecommitdiff
path: root/shared/bin.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared/bin.c')
-rw-r--r--shared/bin.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/shared/bin.c b/shared/bin.c
new file mode 100644
index 0000000..def2aa8
--- /dev/null
+++ b/shared/bin.c
@@ -0,0 +1,11 @@
+#include <stdlib.h>
+#include <stdint.h>
+#include <memory.h>
+
+#include "bin.h"
+
+ws_s_bin *ws_bin_s_alloc(uint16_t bytes) {
+ ws_s_bin *temp = malloc(sizeof(ws_s_bin) + sizeof(uint8_t) * bytes);
+ temp->bytes = bytes;
+ return temp;
+}