[cogl/wip/lionel/introspection: 2/6] cogl-error.h: typedef from GError when using for GLib



commit 771516f8b6aa0fc1a965d3a9ef479bff5b9c48d0
Author: Lionel Landwerlin <llandwerlin gmail com>
Date:   Sun Feb 23 17:23:21 2014 +0000

    cogl-error.h: typedef from GError when using for GLib

 cogl/cogl-error.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/cogl/cogl-error.h b/cogl/cogl-error.h
index 52d9750..78e557b 100644
--- a/cogl/cogl-error.h
+++ b/cogl/cogl-error.h
@@ -33,6 +33,10 @@
 #ifndef __COGL_ERROR_H__
 #define __COGL_ERROR_H__
 
+#ifdef COGL_HAS_GTYPE_SUPPORT
+#include <glib-object.h>
+#endif
+
 #include "cogl-types.h"
 
 COGL_BEGIN_DECLS
@@ -117,11 +121,15 @@ COGL_BEGIN_DECLS
  * @code: A specific error code within a specified domain
  * @message: A human readable error message
  */
+#ifdef COGL_HAS_GLIB_SUPPORT
+#define CoglError GError
+#else
 typedef struct _CoglError {
   uint32_t domain;
   int code;
   char *message;
 } CoglError;
+#endif
 
 /**
  * cogl_error_free:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]