moo_debug_enabled()

master
Yevgen Muntyan 2006-04-24 01:29:05 -05:00
parent e9a850a887
commit e83615d534
2 changed files with 17 additions and 0 deletions

View File

@ -1381,3 +1381,19 @@ moo_data_dir_type_get_type (void)
return type;
}
gboolean
moo_debug_enabled (void)
{
static gboolean enabled;
static gboolean been_here;
if (!been_here)
{
been_here = TRUE;
enabled = g_getenv ("MOO_DEBUG") != NULL;
}
return enabled;
}

View File

@ -48,6 +48,7 @@ void moo_reset_log_func (void);
void moo_segfault (void);
gboolean moo_debug_enabled (void) G_GNUC_CONST;
#define MOO_TYPE_DATA_DIR_TYPE (moo_data_dir_type_get_type ())