Commit b58fb2bd authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

Move short_month_names and long_month_names to bss.

2006-04-04  Matthias Clasen  <mclasen@redhat.com>

        * glib/gdate.c: Move short_month_names and long_month_names
        to bss.

        * glib/gspawn-win32.c (g_spawn_error_quark):
        * glib/gspawn.c (g_spawn_error_quark):
        * glib/gshell.c (g_shell_error_quark):
        * glib/gmarkup.c (g_markup_error_quark):
        * glib/goption.c (g_option_error_quark):
        * glib/gkeyfile.c (g_key_file_error_quark):
        * glib/giochannel.c (g_io_channel_error_quark):
        * glib/gfileutils.c (g_file_error_quark):
        * glib/gconvert.c (g_convert_error_quark):
        * glib/gbookmarkfile.c (g_bookmark_file_error_quark):
        * glib/gthread.c (g_thread_error_quark): No point in making
        the error path fast by caching quarks.

        * glib/gbookmarkfile.c: Make the parser struct const.
parent 5d1c3924
2006-04-04 Matthias Clasen <mclasen@redhat.com>
* glib/gdate.c: Move short_month_names and long_month_names
to bss.
* glib/gspawn-win32.c (g_spawn_error_quark):
* glib/gspawn.c (g_spawn_error_quark):
* glib/gshell.c (g_shell_error_quark):
* glib/gmarkup.c (g_markup_error_quark):
* glib/goption.c (g_option_error_quark):
* glib/gkeyfile.c (g_key_file_error_quark):
* glib/giochannel.c (g_io_channel_error_quark):
* glib/gfileutils.c (g_file_error_quark):
* glib/gconvert.c (g_convert_error_quark):
* glib/gbookmarkfile.c (g_bookmark_file_error_quark):
* glib/gthread.c (g_thread_error_quark): No point in making
the error path fast by caching quarks.
* glib/gbookmarkfile.c: Make the parser struct const.
2006-04-04 Behdad Esfahbod <behdad@gnome.org>
......
2006-04-04 Matthias Clasen <mclasen@redhat.com>
* glib/gdate.c: Move short_month_names and long_month_names
to bss.
* glib/gspawn-win32.c (g_spawn_error_quark):
* glib/gspawn.c (g_spawn_error_quark):
* glib/gshell.c (g_shell_error_quark):
* glib/gmarkup.c (g_markup_error_quark):
* glib/goption.c (g_option_error_quark):
* glib/gkeyfile.c (g_key_file_error_quark):
* glib/giochannel.c (g_io_channel_error_quark):
* glib/gfileutils.c (g_file_error_quark):
* glib/gconvert.c (g_convert_error_quark):
* glib/gbookmarkfile.c (g_bookmark_file_error_quark):
* glib/gthread.c (g_thread_error_quark): No point in making
the error path fast by caching quarks.
* glib/gbookmarkfile.c: Make the parser struct const.
2006-04-04 Behdad Esfahbod <behdad@gnome.org>
......
......@@ -1562,12 +1562,7 @@ timestamp_from_iso8601 (const gchar *iso_date)
GQuark
g_bookmark_file_error_quark (void)
{
static GQuark error_quark = 0;
if (G_UNLIKELY (error_quark == 0))
error_quark = g_quark_from_static_string ("egg-bookmark-file-error-quark");
return error_quark;
return g_quark_from_static_string ("egg-bookmark-file-error-quark");
}
......
......@@ -52,11 +52,7 @@
GQuark
g_convert_error_quark (void)
{
static GQuark quark;
if (!quark)
quark = g_quark_from_static_string ("g_convert_error");
return quark;
return g_quark_from_static_string ("g_convert_error");
}
static gboolean
......
......@@ -451,12 +451,12 @@ G_LOCK_DEFINE_STATIC (g_date_global);
static gchar *long_month_names[13] =
{
"Error", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
NULL,
};
static gchar *short_month_names[13] =
{
"Error", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
NULL,
};
/* This tells us if we need to update the parse info */
......@@ -605,6 +605,9 @@ g_date_prepare_to_parse (const gchar *str, GDateParseTokens *pt)
current_locale = g_strdup (locale);
short_month_names[0] = "Error";
long_month_names[0] = "Error";
while (i < 13)
{
gchar *casefold;
......
......@@ -359,11 +359,7 @@ g_file_test (const gchar *filename,
GQuark
g_file_error_quark (void)
{
static GQuark q = 0;
if (q == 0)
q = g_quark_from_static_string ("g-file-error-quark");
return q;
return g_quark_from_static_string ("g-file-error-quark");
}
/**
......
......@@ -2299,11 +2299,7 @@ g_io_channel_write_unichar (GIOChannel *channel,
GQuark
g_io_channel_error_quark (void)
{
static GQuark q = 0;
if (q == 0)
q = g_quark_from_static_string ("g-io-channel-error-quark");
return q;
return g_quark_from_static_string ("g-io-channel-error-quark");
}
#define __G_IOCHANNEL_C__
......
......@@ -185,12 +185,7 @@ static void g_key_file_flush_parse_buffer (GKeyFile
GQuark
g_key_file_error_quark (void)
{
static GQuark error_quark = 0;
if (error_quark == 0)
error_quark = g_quark_from_static_string ("g-key-file-error-quark");
return error_quark;
return g_quark_from_static_string ("g-key-file-error-quark");
}
static void
......
......@@ -34,12 +34,7 @@
GQuark
g_markup_error_quark (void)
{
static GQuark error_quark = 0;
if (error_quark == 0)
error_quark = g_quark_from_static_string ("g-markup-error-quark");
return error_quark;
return g_quark_from_static_string ("g-markup-error-quark");
}
typedef enum
......
......@@ -118,12 +118,7 @@ static void free_pending_nulls (GOptionContext *context,
GQuark
g_option_error_quark (void)
{
static GQuark q = 0;
if (q == 0)
q = g_quark_from_static_string ("g-option-context-error-quark");
return q;
return g_quark_from_static_string ("g-option-context-error-quark");
}
/**
......
......@@ -36,10 +36,7 @@
GQuark
g_shell_error_quark (void)
{
static GQuark quark = 0;
if (quark == 0)
quark = g_quark_from_static_string ("g-shell-error-quark");
return quark;
return g_quark_from_static_string ("g-shell-error-quark");
}
/* Single quotes preserve the literal string exactly. escape
......
......@@ -199,10 +199,7 @@ protect_argv (gchar **argv,
GQuark
g_spawn_error_quark (void)
{
static GQuark quark = 0;
if (quark == 0)
quark = g_quark_from_static_string ("g-exec-error-quark");
return quark;
return g_quark_from_static_string ("g-exec-error-quark");
}
gboolean
......
......@@ -68,10 +68,7 @@ static gboolean fork_exec_with_pipes (gboolean intermediate_child,
GQuark
g_spawn_error_quark (void)
{
static GQuark quark = 0;
if (quark == 0)
quark = g_quark_from_static_string ("g-exec-error-quark");
return quark;
return g_quark_from_static_string ("g-exec-error-quark");
}
/**
......
......@@ -64,10 +64,7 @@
GQuark
g_thread_error_quark (void)
{
static GQuark quark;
if (!quark)
quark = g_quark_from_static_string ("g_thread_error");
return quark;
return g_quark_from_static_string ("g_thread_error");
}
/* Keep this in sync with GRealThread in gmain.c! */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment