diff options
Diffstat (limited to 'src/type.cpp')
-rw-r--r-- | src/type.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/type.cpp b/src/type.cpp new file mode 100644 index 0000000..8290a07 --- /dev/null +++ b/src/type.cpp @@ -0,0 +1,20 @@ +#ifdef SALTICIDAE_CBINDINGS +#include "salticidae/type.h" + +extern "C" { + +uint8_t *bytearray_data(bytearray_t *arr) { + return &(*arr)[0]; +} + +size_t bytearray_size(bytearray_t *arr) { + return arr->size(); +} + +void bytearray_free(bytearray_t *arr) { + delete arr; +} + +} + +#endif |