forked from AuroraMiddleware/gtk
Move the mixed module check function
This is only called in one place, move the function there.
This commit is contained in:
parent
5b4082ac87
commit
7272610a02
@ -545,6 +545,34 @@ setlocale_initialization (void)
|
||||
}
|
||||
}
|
||||
|
||||
/* Return TRUE if module_to_check causes version conflicts.
|
||||
* If module_to_check is NULL, check the main module.
|
||||
*/
|
||||
static gboolean
|
||||
_gtk_module_has_mixed_deps (GModule *module_to_check)
|
||||
{
|
||||
GModule *module;
|
||||
gpointer func;
|
||||
gboolean result;
|
||||
|
||||
if (!module_to_check)
|
||||
module = g_module_open (NULL, 0);
|
||||
else
|
||||
module = module_to_check;
|
||||
|
||||
if (g_module_symbol (module, "gtk_progress_get_type", &func))
|
||||
result = TRUE;
|
||||
else if (g_module_symbol (module, "gtk_misc_get_type", &func))
|
||||
result = TRUE;
|
||||
else
|
||||
result = FALSE;
|
||||
|
||||
if (!module_to_check)
|
||||
g_module_close (module);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static void
|
||||
do_pre_parse_initialization (void)
|
||||
{
|
||||
|
@ -186,31 +186,3 @@ _gtk_find_module (const gchar *name,
|
||||
g_strfreev (paths);
|
||||
return module_name;
|
||||
}
|
||||
|
||||
/* Return TRUE if module_to_check causes version conflicts.
|
||||
* If module_to_check is NULL, check the main module.
|
||||
*/
|
||||
gboolean
|
||||
_gtk_module_has_mixed_deps (GModule *module_to_check)
|
||||
{
|
||||
GModule *module;
|
||||
gpointer func;
|
||||
gboolean result;
|
||||
|
||||
if (!module_to_check)
|
||||
module = g_module_open (NULL, 0);
|
||||
else
|
||||
module = module_to_check;
|
||||
|
||||
if (g_module_symbol (module, "gtk_progress_get_type", &func))
|
||||
result = TRUE;
|
||||
else if (g_module_symbol (module, "gtk_misc_get_type", &func))
|
||||
result = TRUE;
|
||||
else
|
||||
result = FALSE;
|
||||
|
||||
if (!module_to_check)
|
||||
g_module_close (module);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -33,8 +33,6 @@ gchar * _gtk_find_module (const gchar *name,
|
||||
const gchar *type);
|
||||
gchar ** _gtk_get_module_path (const gchar *type);
|
||||
|
||||
gboolean _gtk_module_has_mixed_deps (GModule *module);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_MODULES_PRIVATE_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user