// // Created by nicol on 2018-03-18. // #include #include "buffer.h" const buffer_t buffer_create(uint32_t size) { buffer_t buf = {size, malloc(size)}; return buf; } const buffer_t buffer_from(uint8_t* data, uint32_t size) { buffer_t buf = {size, data}; return buf; } void buffer_free(buffer_t buffer) { free(buffer.data); }