diff --git a/HISTORY b/HISTORY index debff5f..c808a4f 100755 --- a/HISTORY +++ b/HISTORY @@ -1,3 +1,7 @@ +Dec. 18 2015 +Avoided compiling issues +Improved compatibility with Arduino + Dec. 17 2015 Added support to evaluate a sub routine by an accessor in a PRINT statement Added support to get a value by an accessor in a PRINT statement diff --git a/core/my_basic.c b/core/my_basic.c index 18bb24e..6989f2d 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -37,7 +37,9 @@ # include #endif /* _MSC_VER */ #include -#include +#ifndef ARDUINO +# include +#endif /* ARDUINO */ #include #include #include diff --git a/core/my_basic.h b/core/my_basic.h index c2dea9c..03bf600 100755 --- a/core/my_basic.h +++ b/core/my_basic.h @@ -340,20 +340,20 @@ typedef enum mb_data_e { MB_DT_STRING = 1 << 5, MB_DT_USERTYPE = 1 << 6, MB_DT_USERTYPE_REF = 1 << 7, - MB_DT_ARRAY = 1 << 12, + MB_DT_ARRAY = 1 << 8, #ifdef MB_ENABLE_COLLECTION_LIB - MB_DT_LIST = 1 << 13, - MB_DT_LIST_IT = 1 << 14, - MB_DT_DICT = 1 << 15, - MB_DT_DICT_IT = 1 << 16, + MB_DT_LIST = 1 << 9, + MB_DT_LIST_IT = 1 << 10, + MB_DT_DICT = 1 << 11, + MB_DT_DICT_IT = 1 << 12, #endif /* MB_ENABLE_COLLECTION_LIB */ #ifdef MB_ENABLE_CLASS - MB_DT_CLASS = 1 << 24, + MB_DT_CLASS = 1 << 13, #endif /* MB_ENABLE_CLASS */ - MB_DT_ROUTINE = 1 << 25 + MB_DT_ROUTINE = 1 << 14 } mb_data_e; -typedef unsigned char mb_val_bytes_t[sizeof(void*)]; +typedef unsigned char mb_val_bytes_t[sizeof(void*) > sizeof(unsigned long) ? sizeof(void*) : sizeof(unsigned long)]; typedef union mb_value_u { mb_data_e type;