From da42ddf96c78a73b4cf5f8854e98e009f4f174a4 Mon Sep 17 00:00:00 2001 From: Determinant Date: Tue, 4 Jun 2019 18:59:00 -0400 Subject: ... --- include/salticidae/type.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'include/salticidae/type.h') diff --git a/include/salticidae/type.h b/include/salticidae/type.h index 0ebcce7..b3da4c2 100644 --- a/include/salticidae/type.h +++ b/include/salticidae/type.h @@ -25,6 +25,9 @@ #ifndef _SALTICIDAE_TYPE_H #define _SALTICIDAE_TYPE_H +#include "config.h" + +#ifdef __cplusplus #include #include #include @@ -35,9 +38,6 @@ #include #include -#include "config.h" - -#ifdef __cplusplus namespace salticidae { const auto _1 = std::placeholders::_1; @@ -98,6 +98,7 @@ using bytearray_t = salticidae::bytearray_t; #else +#include #ifdef SALTICIDAE_CBINDINGS typedef struct bytearray_t bytearray_t; #endif @@ -105,19 +106,24 @@ typedef struct bytearray_t bytearray_t; #endif #ifdef SALTICIDAE_CBINDINGS_STR_OP -using _opcode_t = char *; +typedef char * _opcode_t; #else -using _opcode_t = uint8_t; +typedef uint8_t _opcode_t; #endif #ifdef SALTICIDAE_CBINDINGS +#ifdef __cplusplus extern "C" { +#endif +bytearray_t *bytearray_new(); uint8_t *bytearray_data(bytearray_t *arr); size_t bytearray_size(bytearray_t *arr); void bytearray_free(); +#ifdef __cplusplus } #endif +#endif #endif -- cgit v1.2.3