static void u_pkg_class_init(UPkgClass *class)
{
- g_type_class_add_private(class, sizeof (struct upkg_priv));
-
GTypeModuleClass *modclass = G_TYPE_MODULE_CLASS(class);
+ const char *modpath = getenv("UOBJECT_MODULE_PATH");
+
+ g_type_class_add_private(class, sizeof (struct upkg_priv));
if (lt_dlinit() != 0) {
dl_print_errors(__func__);
}
+ if (modpath && lt_dlsetsearchpath(modpath) != 0) {
+ dl_print_errors(__func__);
+ }
+ if (lt_dladdsearchdir(PKGLIBDIR) != 0) {
+ dl_print_errors(__func__);
+ }
+
modclass->load = u_pkg_load;
modclass->unload = u_pkg_unload;
}