Galago - desktop presence framework

galago-assert.h File Reference

Assertion API. More...

#include <libgalago/galago-log.h>

Go to the source code of this file.


Defines

#define GALAGO_LIKELY(expr)   (expr)
#define GALAGO_UNLIKELY(expr)   (expr)
#define galago_return_if_fail(cond)
#define galago_return_val_if_fail(cond, value)
#define galago_return_if_fail(cond, label)

Detailed Description

Assertion API.

Copyright:
(C) 2004-2005 Christian Hammond.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Definition in file galago-assert.h.


Define Documentation

#define galago_return_if_fail cond,
label   ) 
 

Value:

if (GALAGO_UNLIKELY(!(cond))) \
    { \
        galago_log(GALAGO_LOG_ASSERT, \
                   "file %s: line %d: assertion `%s' failed\n", \
                   __FILE__, \
                   __LINE__, \
                   #cond); \
        goto label; \
    }

Definition at line 104 of file galago-assert.h.

#define galago_return_if_fail cond   ) 
 

Value:

if (GALAGO_UNLIKELY(!(cond))) \
    { \
        galago_log(GALAGO_LOG_ASSERT, \
                   "file %s: line %d: assertion `%s' failed\n", \
                   __FILE__, \
                   __LINE__, \
                   #cond); \
        return; \
    }

Definition at line 104 of file galago-assert.h.

#define galago_return_val_if_fail cond,
value   ) 
 

Value:

if (GALAGO_UNLIKELY(!(cond))) \
    { \
        galago_log(GALAGO_LOG_ASSERT, \
                   "file %s: line %d: assertion `%s' failed\n", \
                   __FILE__, \
                   __LINE__, \
                   #cond); \
        return (value); \
    }

Definition at line 93 of file galago-assert.h.