applied patch from David Schleef <ds@schleef.org> which implements a

Fri Feb 20 02:39:03 2004  Tim Janik  <timj@gtk.org>

        * applied patch from David Schleef <ds@schleef.org> which implements
        a G_MODULE_BIND_LOCAL flag to g_module_open() to disable global
        symbol registration.
This commit is contained in:
Tim Janik
2004-02-20 01:41:00 +00:00
committed by Tim Janik
parent fb464bde99
commit defca980e4
15 changed files with 85 additions and 15 deletions

View File

@@ -26,7 +26,8 @@ static gpointer self_module = GINT_TO_POINTER (1);
static gpointer
_g_module_open (const gchar *file_name,
gboolean bind_lazy)
gboolean bind_lazy,
gboolean bind_local)
{
NSObjectFileImage image;
NSObjectFileImageReturnCode ret;
@@ -66,7 +67,9 @@ _g_module_open (const gchar *file_name,
return NULL;
}
options = NSLINKMODULE_OPTION_RETURN_ON_ERROR | NSLINKMODULE_OPTION_PRIVATE;
options = NSLINKMODULE_OPTION_RETURN_ON_ERROR;
if (bind_local)
options |= NSLINKMODULE_OPTION_PRIVATE;
if (!bind_lazy)
options |= NSLINKMODULE_OPTION_BINDNOW;
module = NSLinkModule (image, file_name, options);