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.
This commit is contained in:
Matthias Clasen 2006-04-04 04:37:39 +00:00 committed by Matthias Clasen
parent 5d1c3924e1
commit b58fb2bdb5
14 changed files with 48 additions and 57 deletions

View File

@ -1,5 +1,21 @@
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>

View File

@ -1,5 +1,21 @@
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>

View File

@ -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");
}

View File

@ -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

View File

@ -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;

View File

@ -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");
}
/**

View File

@ -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__

View File

@ -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

View File

@ -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

View File

@ -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");
}
/**

View File

@ -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

View File

@ -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

View File

@ -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");
}
/**

View File

@ -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! */