diff options
author | Determinant <[email protected]> | 2019-06-04 16:13:52 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2019-06-04 16:13:52 -0400 |
commit | ebada91a1327da99f1827c7e4c15fc3bee527d58 (patch) | |
tree | 904aeb2afbc54612b704f89a80c7a48953943220 /src/type.cpp | |
parent | 9f294eb2e0ae0bed8120fc34fd9782f2f0a9ac74 (diff) |
more bindings
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 |