WARNING: The online documentation has moved to https://docs.pjsip.org.

Visit the new documentation at https://docs.pjsip.org:

BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJLIB Reference

Assertion Macro

Macros

#define pj_assert(expr)
 
#define PJ_ASSERT_RETURN(expr, retval)
 
#define PJ_ASSERT_ON_FAIL(expr, exec_on_fail)
 

Detailed Description

Assertion and other helper macros for sanity checking.

Macro Definition Documentation

◆ pj_assert

#define pj_assert (   expr)

Check during debug build that an expression is true. If the expression computes to false during run-time, then the program will stop at the offending statements. For release build, this macro will not do anything.

Parameters
exprThe expression to be evaluated.

◆ PJ_ASSERT_ON_FAIL

#define PJ_ASSERT_ON_FAIL (   expr,
  exec_on_fail 
)

If the expression yields false, assertion will be triggered and exec_on_fail will be executed.

◆ PJ_ASSERT_RETURN

#define PJ_ASSERT_RETURN (   expr,
  retval 
)

If the expression yields false, assertion will be triggered and the current function will return with the specified return value.

 


PJLIB Open Source, high performance, small footprint, and very very portable framework
Copyright (C) 2006-2009 Teluu Inc.