[cogl] object: use GLib's DestroyNotify if compiled with GLib



commit e1d2635f45c595d00ccc7226a613688c7802dc53
Author: Lionel Landwerlin <llandwerlin gmail com>
Date:   Tue Sep 3 22:00:36 2013 +0100

    object: use GLib's DestroyNotify if compiled with GLib
    
    Reviewed-by: Robert Bragg <robert linux intel com>
    
    (cherry picked from commit b53de3352192618d33400363040d79cb2bc66fb0)

 cogl/cogl-object.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/cogl/cogl-object.h b/cogl/cogl-object.h
index c22be15..a853483 100644
--- a/cogl/cogl-object.h
+++ b/cogl/cogl-object.h
@@ -26,6 +26,9 @@
 #define __COGL_OBJECT_H
 
 #include <cogl/cogl-types.h>
+#ifdef COGL_HAS_GTYPE_SUPPORT
+#include <glib.h>
+#endif
 
 COGL_BEGIN_DECLS
 
@@ -103,7 +106,11 @@ typedef struct {
  *
  * Since: 1.4
  */
+#ifdef COGL_HAS_GTYPE_SUPPORT
+typedef GDestroyNotify CoglUserDataDestroyCallback;
+#else
 typedef void (*CoglUserDataDestroyCallback) (void *user_data);
+#endif
 
 /**
  * CoglDebugObjectTypeInfo:


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