*polished macro.

This commit is contained in:
Wang Renxin 2016-06-20 15:41:36 +08:00 committed by GitHub
parent c2bd7fd68c
commit bd735d5990

View File

@ -841,7 +841,7 @@ static _object_t* _exp_assign = 0;
} while(0) } while(0)
#if MB_CONVERT_TO_INT_LEVEL == MB_CONVERT_TO_INT_LEVEL_NONE #if MB_CONVERT_TO_INT_LEVEL == MB_CONVERT_TO_INT_LEVEL_NONE
# define _convert_to_int_if_posible(__o) ((void)(__o)) # define _convert_to_int_if_posible(__o) do { ((void)(__o)); } while(0)
#else /* MB_CONVERT_TO_INT_LEVEL == MB_CONVERT_TO_INT_LEVEL_NONE */ #else /* MB_CONVERT_TO_INT_LEVEL == MB_CONVERT_TO_INT_LEVEL_NONE */
# define _convert_to_int_if_posible(__o) \ # define _convert_to_int_if_posible(__o) \
do { \ do { \
@ -1013,7 +1013,7 @@ static _object_t* _exp_assign = 0;
} \ } \
} while(0) } while(0)
#else /* MB_ENABLE_USERTYPE_REF */ #else /* MB_ENABLE_USERTYPE_REF */
# define _instruct_obj_meta_obj(__optr, __tuple, __result, __exit) ((void)(__tuple)); ((void)(__result)); # define _instruct_obj_meta_obj(__optr, __tuple, __result, __exit) do { ((void)(__tuple)); ((void)(__result)); } while(0)
#endif /* MB_ENABLE_USERTYPE_REF */ #endif /* MB_ENABLE_USERTYPE_REF */
#define _proc_div_by_zero(__s, __tuple, __exit, __result, __kind) \ #define _proc_div_by_zero(__s, __tuple, __exit, __result, __kind) \
do { \ do { \
@ -1038,19 +1038,21 @@ static _object_t* _exp_assign = 0;
} while(0) } while(0)
#define _math_calculate_fun_real(__s, __l, __a, __f, __exit, __result) \ #define _math_calculate_fun_real(__s, __l, __a, __f, __exit, __result) \
switch((__a).type) { \ do { \
case MB_DT_INT: \ switch((__a).type) { \
(__a).value.float_point = (real_t)__f((real_t)(__a).value.integer); \ case MB_DT_INT: \
(__a).type = MB_DT_REAL; \ (__a).value.float_point = (real_t)__f((real_t)(__a).value.integer); \
break; \ (__a).type = MB_DT_REAL; \
case MB_DT_REAL: \ break; \
(__a).value.float_point = (real_t)__f((__a).value.float_point); \ case MB_DT_REAL: \
break; \ (__a).value.float_point = (real_t)__f((__a).value.float_point); \
default: \ break; \
_handle_error_on_obj(__s, SE_RN_NUMBER_EXPECTED, (__s)->source_file, ((__l) && *(__l)) ? ((_object_t*)(((_tuple3_t*)(*(__l)))->e1)) : 0, MB_FUNC_WARNING, __exit, __result); \ default: \
break; \ _handle_error_on_obj(__s, SE_RN_NUMBER_EXPECTED, (__s)->source_file, ((__l) && *(__l)) ? ((_object_t*)(((_tuple3_t*)(*(__l)))->e1)) : 0, MB_FUNC_WARNING, __exit, __result); \
} \ break; \
mb_convert_to_int_if_posible(__a); } \
mb_convert_to_int_if_posible(__a); \
} while(0)
#define _using_jump_set_of_instructional(__s, __obj, __exit, __result) \ #define _using_jump_set_of_instructional(__s, __obj, __exit, __result) \
do { \ do { \
@ -1060,7 +1062,6 @@ static _object_t* _exp_assign = 0;
(__s)->jump_set |= _JMP_INS; \ (__s)->jump_set |= _JMP_INS; \
} \ } \
} while(0) } while(0)
#define _using_jump_set_of_structured(__s, __obj, __exit, __result) \ #define _using_jump_set_of_structured(__s, __obj, __exit, __result) \
do { \ do { \
if((__s)->jump_set & (~_JMP_STR)) { \ if((__s)->jump_set & (~_JMP_STR)) { \