Re: g_messages_init



On 26 Apr 2001, Havoc Pennington wrote:

> 
> Hi,
> 
> There's this g_messages_init() function that creates the mutex for
> gmessages.c globals, but it never seems to be called. So the mutex is
> always NULL?

that reminds me, could you move the contents of:

  if (!initted)
    {
      const gchar *val;
      initted = TRUE;

      val = g_getenv ("G_PREFIX_MESSAGES");

      if (val)
        {
          static const GDebugKey keys[] = {
            { "error", G_LOG_LEVEL_ERROR },
            { "critical", G_LOG_LEVEL_CRITICAL },
            { "warning", G_LOG_LEVEL_WARNING },
            { "message", G_LOG_LEVEL_MESSAGE },
            { "info", G_LOG_LEVEL_INFO },
            { "debug", G_LOG_LEVEL_DEBUG }
          };

          g_log_msg_prefix = g_parse_debug_string (val, keys, G_N_ELEMENTS (keys));
        }
    }

into that place as well.
(and we usually use "initialized" not "initted", i wonder whether
that's an english word at all)

> 
> Havoc
> 

---
ciaoTJ





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