2008-02-07 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script-parser.c: (clutter_script_get_type_from_symbol), (clutter_script_get_type_from_class): Use BIND_LAZY flag when looking at the symbols, so we don't load them all up. * clutter/clutter-script.c (resolve_alpha_func): Ditto as above.
This commit is contained in:
parent
56a34b724f
commit
6b4a9c4df5
@ -1,3 +1,12 @@
|
||||
2008-02-07 Emmanuele Bassi <ebassi@openedhand.com>
|
||||
|
||||
* clutter/clutter-script-parser.c:
|
||||
(clutter_script_get_type_from_symbol),
|
||||
(clutter_script_get_type_from_class): Use BIND_LAZY flag
|
||||
when looking at the symbols, so we don't load them all up.
|
||||
|
||||
* clutter/clutter-script.c (resolve_alpha_func): Ditto as above.
|
||||
|
||||
2008-02-07 Øyvind Kolås <pippin@o-hand.com>
|
||||
|
||||
* clutter/clutter-actor.c:
|
||||
|
@ -26,7 +26,7 @@ clutter_script_get_type_from_symbol (const gchar *symbol)
|
||||
GType gtype = G_TYPE_INVALID;
|
||||
|
||||
if (!module)
|
||||
module = g_module_open (NULL, 0);
|
||||
module = g_module_open (NULL, G_MODULE_BIND_LAZY);
|
||||
|
||||
if (g_module_symbol (module, symbol, (gpointer)&func))
|
||||
gtype = func ();
|
||||
@ -64,7 +64,10 @@ clutter_script_get_type_from_class (const gchar *name)
|
||||
symbol = g_string_free (symbol_name, FALSE);
|
||||
|
||||
if (g_module_symbol (module, symbol, (gpointer)&func))
|
||||
gtype = func ();
|
||||
{
|
||||
CLUTTER_NOTE (SCRIPT, "Type function: %s", symbol);
|
||||
gtype = func ();
|
||||
}
|
||||
|
||||
g_free (symbol);
|
||||
|
||||
|
@ -506,12 +506,13 @@ resolve_alpha_func (const gchar *name)
|
||||
gint i;
|
||||
|
||||
if (G_UNLIKELY (!module))
|
||||
module = g_module_open (NULL, 0);
|
||||
module = g_module_open (NULL, G_MODULE_BIND_LAZY);
|
||||
|
||||
CLUTTER_NOTE (SCRIPT, "Looking for `%s' alpha function", name);
|
||||
|
||||
if (g_module_symbol (module, name, (gpointer) &func))
|
||||
return func;
|
||||
{
|
||||
CLUTTER_NOTE (SCRIPT, "Found `%s' alpha function", name);
|
||||
return func;
|
||||
}
|
||||
|
||||
symbol_name = g_string_new ("");
|
||||
g_string_append (symbol_name, "clutter_");
|
||||
@ -528,12 +529,16 @@ resolve_alpha_func (const gchar *name)
|
||||
|
||||
symbol = g_string_free (symbol_name, FALSE);
|
||||
|
||||
if (!g_module_symbol (module, symbol, (gpointer)&func))
|
||||
func = NULL;
|
||||
if (g_module_symbol (module, symbol, (gpointer)&func))
|
||||
{
|
||||
CLUTTER_NOTE (SCRIPT, "Found `%s' alpha function", symbol);
|
||||
g_free (symbol);
|
||||
return func;
|
||||
}
|
||||
|
||||
g_free (symbol);
|
||||
|
||||
return func;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GObject *
|
||||
|
Loading…
x
Reference in New Issue
Block a user