From 87e9353728c1115e7f60b1f7bb63e79723888907 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sun, 30 Oct 2005 19:17:37 +0000 Subject: Don't use BIND_LAZY when enabling debugging. That way we can find missing 2005-10-30 Christian Persch * lib/ephy-module.c: (ephy_module_load): Don't use BIND_LAZY when enabling debugging. That way we can find missing symbols in extensions more easily. --- ChangeLog | 7 +++++++ lib/ephy-module.c | 17 +++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index b1dbb2109..3a835f1c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-10-30 Christian Persch + + * lib/ephy-module.c: (ephy_module_load): + + Don't use BIND_LAZY when enabling debugging. That way we can find + missing symbols in extensions more easily. + 2005-10-30 Emmanuele Bassi * lib/ephy-glade.c: (glade_signal_connect_func): diff --git a/lib/ephy-module.c b/lib/ephy-module.c index 1da457aaa..8c9c977e4 100644 --- a/lib/ephy-module.c +++ b/lib/ephy-module.c @@ -86,17 +86,24 @@ ephy_module_load (GTypeModule *gmodule) EphyModule *module = EPHY_MODULE (gmodule); EphyModuleRegisterFunc register_func; gboolean is_absolute; + GModuleFlags flags = G_MODULE_BIND_LOCAL | G_MODULE_BIND_LAZY; LOG ("Loading %s", module->path); + /* In debug builds, we bind immediately so we can find missing + * symbols in extensions on load; otherwise we bind lazily + */ +#ifdef GNOME_ENABLE_DEBUG + flags &= ~G_MODULE_BIND_LAZY; +#endif + is_absolute = g_path_is_absolute (module->path); if (module->library == NULL && ! is_absolute) { char *path = g_build_filename (EXTENSIONS_DIR, module->path, NULL); - module->library = g_module_open (path, G_MODULE_BIND_LAZY | - G_MODULE_BIND_LOCAL); + module->library = g_module_open (path, flags); g_free (path); } @@ -105,16 +112,14 @@ ephy_module_load (GTypeModule *gmodule) { char *path = g_build_filename (ephy_dot_dir(), "extensions", module->path, NULL); - module->library = g_module_open (path, G_MODULE_BIND_LAZY | - G_MODULE_BIND_LOCAL); + module->library = g_module_open (path, flags); g_free (path); } if (module->library == NULL) { - module->library = g_module_open (module->path, G_MODULE_BIND_LAZY | - G_MODULE_BIND_LOCAL); + module->library = g_module_open (module->path, flags); } if (module->library == NULL) -- cgit v1.2.3