[cogl/wip/standalone: 9/13] core: Don't use g_once_*() API



commit 0cdd41d60997b65e62638a3f58bd4b813aac04da
Author: Damien Lespiau <damien lespiau intel com>
Date:   Mon Feb 27 15:16:29 2012 +0000

    core: Don't use g_once_*() API
    
    As Cogl is not thread safe, we don't really need a thread safe
    _cogl_init() function.

 cogl/cogl.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/cogl/cogl.c b/cogl/cogl.c
index 3784836..e711814 100644
--- a/cogl/cogl.c
+++ b/cogl/cogl.c
@@ -991,9 +991,9 @@ _cogl_error_quark (void)
 void
 _cogl_init (void)
 {
-  static gsize init_status = 0;
+  static gboolean initialized = FALSE;
 
-  if (g_once_init_enter (&init_status))
+  if (initialized == FALSE)
     {
       bindtextdomain (GETTEXT_PACKAGE, COGL_LOCALEDIR);
       bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
@@ -1002,7 +1002,7 @@ _cogl_init (void)
 
       _cogl_config_read ();
       _cogl_debug_check_environment ();
-      g_once_init_leave (&init_status, 1);
+      initialized = TRUE;
     }
 }
 



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