mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-12-12 03:23:03 +01:00
gmessages: Add static variables only if needed
The static variables win32_keep_fatal_message and fatal_msg_buf are only used for Windows debug builds and those without G_WINAPI_ONLY_APP defined. These checks are already in place for consumer of fatal_msg_buf, so extend their usage.
This commit is contained in:
@@ -432,7 +432,7 @@ _g_log_abort (gboolean breakpoint)
|
|||||||
g_abort ();
|
g_abort ();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef G_OS_WIN32
|
#if defined(G_OS_WIN32) && (defined(_DEBUG) || !defined(G_WINAPI_ONLY_APP))
|
||||||
static gboolean win32_keep_fatal_message = FALSE;
|
static gboolean win32_keep_fatal_message = FALSE;
|
||||||
|
|
||||||
/* This default message will usually be overwritten. */
|
/* This default message will usually be overwritten. */
|
||||||
@@ -1109,7 +1109,7 @@ mklevel_prefix (gchar level_prefix[STRING_BUFFER_SIZE],
|
|||||||
if (log_level & ALERT_LEVELS)
|
if (log_level & ALERT_LEVELS)
|
||||||
strcat (level_prefix, " **");
|
strcat (level_prefix, " **");
|
||||||
|
|
||||||
#ifdef G_OS_WIN32
|
#if defined(G_OS_WIN32) && (defined(_DEBUG) || !defined(G_WINAPI_ONLY_APP))
|
||||||
if ((log_level & G_LOG_FLAG_FATAL) != 0 && !g_test_initialized ())
|
if ((log_level & G_LOG_FLAG_FATAL) != 0 && !g_test_initialized ())
|
||||||
win32_keep_fatal_message = TRUE;
|
win32_keep_fatal_message = TRUE;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user