Ignore:
Timestamp:
Dec 30, 2005 11:50:15 PM (18 years ago)
Author:
bennylp
Message:

Basic module, transport, and sending messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/assert.h

    r65 r106  
    6868#endif 
    6969 
     70/** 
     71 * @hideinitializer 
     72 * If #PJ_ENABLE_EXTRA_CHECK is declared and non-zero, then  
     73 * #PJ_ASSERT_ON_FAIL macro will evaluate the expression in @a expr during 
     74 * run-time. If the expression yields false, assertion will be triggered 
     75 * and @a exec_on_fail will be executed. 
     76 * 
     77 * If #PJ_ENABLE_EXTRA_CHECK is not declared or is zero, then no run-time 
     78 * checking will be performed. The macro simply evaluates to pj_assert(expr). 
     79 */ 
     80#if defined(PJ_ENABLE_EXTRA_CHECK) && PJ_ENABLE_EXTRA_CHECK != 0 
     81#   define PJ_ASSERT_ON_FAIL(expr,exec_on_fail)    \ 
     82            do { \ 
     83                pj_assert(expr); \ 
     84                if (!(expr)) exec_on_fail; \ 
     85            } while (0) 
     86#else 
     87#   define PJ_ASSERT_ON_FAIL(expr,exec_on_fail)    pj_assert(expr) 
     88#endif 
     89 
    7090/** @} */ 
    7191 
Note: See TracChangeset for help on using the changeset viewer.