tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

pr_assert.rst (750B)


      1 PR_ASSERT
      2 =========
      3 
      4 Terminates execution when a given expression is ``FALSE``.
      5 
      6 
      7 Syntax
      8 ------
      9 
     10 .. code::
     11 
     12   #include <prlog.h>
     13 
     14   void PR_ASSERT ( expression );
     15 
     16 
     17 Parameters
     18 ~~~~~~~~~~
     19 
     20 The macro has this parameter:
     21 
     22 expression
     23   Any valid C language expression that evaluates to ``TRUE`` or
     24   ``FALSE``.
     25 
     26 
     27 Returns
     28 ~~~~~~~
     29 
     30 Nothing
     31 
     32 
     33 Description
     34 -----------
     35 
     36 This macro evaluates the specified expression. When the result is zero
     37 (``FALSE``) the application terminates; otherwise the application
     38 continues. The macro converts the expression to a string and passes it
     39 to ``PR_Assert``, using file and line parameters from the compile-time
     40 environment.
     41 
     42 This macro compiles to nothing if compile-time options are not specified
     43 to enable logging.