mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-21 14:49:16 +02:00
Fix redefinition of local variable in gio/giomodule.c
This commit is contained in:
parent
94264e6190
commit
a30ae2497d
@ -517,7 +517,7 @@ g_io_modules_scan_all_in_directory_with_scope (const char *dirname,
|
|||||||
char *line = lines[i];
|
char *line = lines[i];
|
||||||
char *file;
|
char *file;
|
||||||
char *colon;
|
char *colon;
|
||||||
char **extension_points;
|
char **strv_extension_points;
|
||||||
|
|
||||||
if (line[0] == '#')
|
if (line[0] == '#')
|
||||||
continue;
|
continue;
|
||||||
@ -537,8 +537,8 @@ g_io_modules_scan_all_in_directory_with_scope (const char *dirname,
|
|||||||
cache = g_hash_table_new_full (g_str_hash, g_str_equal,
|
cache = g_hash_table_new_full (g_str_hash, g_str_equal,
|
||||||
g_free, (GDestroyNotify)g_strfreev);
|
g_free, (GDestroyNotify)g_strfreev);
|
||||||
|
|
||||||
extension_points = g_strsplit (colon, ",", -1);
|
strv_extension_points = g_strsplit (colon, ",", -1);
|
||||||
g_hash_table_insert (cache, file, extension_points);
|
g_hash_table_insert (cache, file, strv_extension_points);
|
||||||
}
|
}
|
||||||
g_strfreev (lines);
|
g_strfreev (lines);
|
||||||
}
|
}
|
||||||
@ -550,24 +550,24 @@ g_io_modules_scan_all_in_directory_with_scope (const char *dirname,
|
|||||||
GIOExtensionPoint *extension_point;
|
GIOExtensionPoint *extension_point;
|
||||||
GIOModule *module;
|
GIOModule *module;
|
||||||
gchar *path;
|
gchar *path;
|
||||||
char **extension_points = NULL;
|
char **strv_extension_points = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
path = g_build_filename (dirname, name, NULL);
|
path = g_build_filename (dirname, name, NULL);
|
||||||
module = g_io_module_new (path);
|
module = g_io_module_new (path);
|
||||||
|
|
||||||
if (cache)
|
if (cache)
|
||||||
extension_points = g_hash_table_lookup (cache, name);
|
strv_extension_points = g_hash_table_lookup (cache, name);
|
||||||
|
|
||||||
if (extension_points != NULL &&
|
if (strv_extension_points != NULL &&
|
||||||
g_stat (path, &statbuf) == 0 &&
|
g_stat (path, &statbuf) == 0 &&
|
||||||
statbuf.st_ctime <= cache_time)
|
statbuf.st_ctime <= cache_time)
|
||||||
{
|
{
|
||||||
/* Lazy load/init the library when first required */
|
/* Lazy load/init the library when first required */
|
||||||
for (i = 0; extension_points[i] != NULL; i++)
|
for (i = 0; strv_extension_points[i] != NULL; i++)
|
||||||
{
|
{
|
||||||
extension_point =
|
extension_point =
|
||||||
g_io_extension_point_register (extension_points[i]);
|
g_io_extension_point_register (strv_extension_points[i]);
|
||||||
extension_point->lazy_load_modules =
|
extension_point->lazy_load_modules =
|
||||||
g_list_prepend (extension_point->lazy_load_modules,
|
g_list_prepend (extension_point->lazy_load_modules,
|
||||||
module);
|
module);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user