diff options
author | Determinant <tederminant@gmail.com> | 2019-06-04 16:13:52 -0400 |
---|---|---|
committer | Determinant <tederminant@gmail.com> | 2019-06-04 16:13:52 -0400 |
commit | ebada91a1327da99f1827c7e4c15fc3bee527d58 (patch) | |
tree | 904aeb2afbc54612b704f89a80c7a48953943220 /include/salticidae/type.h | |
parent | 9f294eb2e0ae0bed8120fc34fd9782f2f0a9ac74 (diff) |
more bindings
Diffstat (limited to 'include/salticidae/type.h')
-rw-r--r-- | include/salticidae/type.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/include/salticidae/type.h b/include/salticidae/type.h index 3ec202a..0ebcce7 100644 --- a/include/salticidae/type.h +++ b/include/salticidae/type.h @@ -35,6 +35,9 @@ #include <functional> #include <mutex> +#include "config.h" + +#ifdef __cplusplus namespace salticidae { const auto _1 = std::placeholders::_1; @@ -89,10 +92,32 @@ inline auto generic_bind(ReturnType(ClassType::* f)(Args...), FArgs&&... fargs) } +#ifdef SALTICIDAE_CBINDINGS +using bytearray_t = salticidae::bytearray_t; +#endif + +#else + +#ifdef SALTICIDAE_CBINDINGS +typedef struct bytearray_t bytearray_t; +#endif + +#endif + #ifdef SALTICIDAE_CBINDINGS_STR_OP -using _opcode_t = std::string; +using _opcode_t = char *; #else using _opcode_t = uint8_t; #endif +#ifdef SALTICIDAE_CBINDINGS +extern "C" { + +uint8_t *bytearray_data(bytearray_t *arr); +size_t bytearray_size(bytearray_t *arr); +void bytearray_free(); + +} +#endif + #endif |