elog_assert_hook(#EXPR, __FUNCTION__, __LINE__); \ } \ } #else #define ELOG_ASSERT(EXPR) ((void)0); #endif 如果定义了ELOG_ASSERT_ENABLE就执行 如果没有定义ELOG_ASSERT_ENABLE就啥也不做 执行什么? #define ELOG_ASSERT(EXPR) if (!(EXPR)) { if (elog_assert_hook == NULL) ...
I cannot assert oneself can overcome all sorts of shortcomings, because the perseverance is insufficient, but may rely on that positive upward enthusiasm to urge on oneself, gradually, can raise slowly, the full use always cared about supports the superiority which I the huge relatives and friends...
printf("(%s) has assert failed at %s:%ld.", #EXPR, __FUNCTION__, __LINE__); \ } else { \ g_check_hook(#EXPR, __FUNCTION__, __LINE__); \ } \ } \ else printf("(%s) has successed\r\n", #EXPR); \ }while(0); 【注意这里:最后一行 不能再有 \ 了 否则会认为后面还是...