Commit fe63fe5d authored by Tim Janik's avatar Tim Janik Committed by Tim Janik

don't call module initializers multiple times. changed --gtk-with-module

Mon Aug 17 05:10:29 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkmain.c (gtk_init): don't call module initializers multiple
        times. changed --gtk-with-module to --gtk-module at owen's request.
parent 2b7f8016
Mon Aug 17 05:10:29 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): don't call module initializers multiple
times. changed --gtk-with-module to --gtk-module at owen's request.
Mon Aug 17 03:47:55 1998 Tim Janik <timj@gtk.org> Mon Aug 17 03:47:55 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): feature a new commandline option * gtk/gtkmain.c (gtk_init): feature a new commandline option
......
Mon Aug 17 05:10:29 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): don't call module initializers multiple
times. changed --gtk-with-module to --gtk-module at owen's request.
Mon Aug 17 03:47:55 1998 Tim Janik <timj@gtk.org> Mon Aug 17 03:47:55 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): feature a new commandline option * gtk/gtkmain.c (gtk_init): feature a new commandline option
......
Mon Aug 17 05:10:29 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): don't call module initializers multiple
times. changed --gtk-with-module to --gtk-module at owen's request.
Mon Aug 17 03:47:55 1998 Tim Janik <timj@gtk.org> Mon Aug 17 03:47:55 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): feature a new commandline option * gtk/gtkmain.c (gtk_init): feature a new commandline option
......
Mon Aug 17 05:10:29 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): don't call module initializers multiple
times. changed --gtk-with-module to --gtk-module at owen's request.
Mon Aug 17 03:47:55 1998 Tim Janik <timj@gtk.org> Mon Aug 17 03:47:55 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): feature a new commandline option * gtk/gtkmain.c (gtk_init): feature a new commandline option
......
Mon Aug 17 05:10:29 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): don't call module initializers multiple
times. changed --gtk-with-module to --gtk-module at owen's request.
Mon Aug 17 03:47:55 1998 Tim Janik <timj@gtk.org> Mon Aug 17 03:47:55 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): feature a new commandline option * gtk/gtkmain.c (gtk_init): feature a new commandline option
......
Mon Aug 17 05:10:29 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): don't call module initializers multiple
times. changed --gtk-with-module to --gtk-module at owen's request.
Mon Aug 17 03:47:55 1998 Tim Janik <timj@gtk.org> Mon Aug 17 03:47:55 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): feature a new commandline option * gtk/gtkmain.c (gtk_init): feature a new commandline option
......
Mon Aug 17 05:10:29 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): don't call module initializers multiple
times. changed --gtk-with-module to --gtk-module at owen's request.
Mon Aug 17 03:47:55 1998 Tim Janik <timj@gtk.org> Mon Aug 17 03:47:55 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmain.c (gtk_init): feature a new commandline option * gtk/gtkmain.c (gtk_init): feature a new commandline option
......
...@@ -309,12 +309,12 @@ gtk_init (int *argc, ...@@ -309,12 +309,12 @@ gtk_init (int *argc,
} }
(*argv)[i] = NULL; (*argv)[i] = NULL;
} }
else if (strcmp ("--gtk-with-module", (*argv)[i]) == 0 || else if (strcmp ("--gtk-module", (*argv)[i]) == 0 ||
strncmp ("--gtk-with-module=", (*argv)[i], 18) == 0) strncmp ("--gtk-module=", (*argv)[i], 13) == 0)
{ {
GModule *module = NULL; GModule *module = NULL;
GtkModuleInitFunc modinit_func = NULL; GtkModuleInitFunc modinit_func = NULL;
gchar *module_name = (*argv)[i] + 17; gchar *module_name = (*argv)[i] + 12;
if (*module_name == '=') if (*module_name == '=')
module_name++; module_name++;
...@@ -339,7 +339,15 @@ gtk_init (int *argc, ...@@ -339,7 +339,15 @@ gtk_init (int *argc,
if (module && if (module &&
g_module_symbol (module, "gtk_module_init", (gpointer*) &modinit_func) && g_module_symbol (module, "gtk_module_init", (gpointer*) &modinit_func) &&
modinit_func) modinit_func)
gtk_modinit_funcs = g_slist_prepend (gtk_modinit_funcs, modinit_func); {
if (!g_slist_find (gtk_modinit_funcs, modinit_func))
gtk_modinit_funcs = g_slist_prepend (gtk_modinit_funcs, modinit_func);
else
{
g_module_close (module);
module = NULL;
}
}
} }
if (!modinit_func) if (!modinit_func)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment