gfsmAssert.h
Go to the documentation of this file.
1 
2 /*=============================================================================*\
3  * File: gfsmAssert.h
4  * Author: Bryan Jurish <moocow.bovine@gmail.com>
5  * Description: finite state machine library: assertions
6  *
7  * Copyright (c) 2007 Bryan Jurish.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 3 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22  *=============================================================================*/
23 
28 #ifndef _GFSM_ASSERT_H
29 #define _GFSM_ASSERT_H
30 
31 #include <glib.h>
32 
43 #ifdef GFSM_DEBUG_ENABLED
44 # define gfsm_assert_not_reached() g_assert_not_reached()
45 # define gfsm_assert(expr) g_assert(expr)
46 #else
47 # define gfsm_assert_not_reached()
48 # define gfsm_assert(expr)
49 #endif
50 
51 #endif /* _GFSM_ASSERT_H */