OpenAB  1.0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
OpenAB_glib2_global.h
Go to the documentation of this file.
1 /*
2  * This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this
4  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5  */
10 #ifndef OpenAB_GLIB2_GLOBAL_H_
11 #define OPENAB_GLIB2_GLOBAL_H_
12 
13 #include <glib.h>
14 
15 #define GERROR_FREE(__gerror_p) \
16  if (NULL != __gerror_p){ \
17  g_error_free(__gerror_p); \
18  __gerror_p = NULL; \
19  }
20 
21 #define GERROR_MESSAGE(__gerror_p) \
22  ( ( NULL != __gerror_p) ? ( __gerror_p->message ) : "" )
23 
24 #endif // OpenAB_GLIB2_GLOBAL_H_