68 #define ev_module_get_type _ev_module_get_type
80 g_warning (
"%s", g_module_error ());
86 if (!g_module_symbol (module->
library,
"register_evince_backend",
87 (
void *) ®ister_func)) {
88 g_warning (
"%s", g_module_error ());
89 g_module_close (module->
library);
97 g_warning (
"Symbol 'register_evince_backend' should not be NULL");
98 g_module_close (module->
library);
103 module->
type = register_func (gmodule);
105 if (module->
type == 0) {
106 g_warning (
"Invalid evince backend contained by module %s", module->
path);
112 g_module_make_resident (module->
library);
122 g_module_close (module->
library);
139 if (module->
type == 0)
142 return g_object_new (module->
type, NULL);
163 g_free (module->
path);
165 G_OBJECT_CLASS (ev_module_parent_class)->finalize (
object);
171 GObjectClass *object_class = G_OBJECT_CLASS (
class);
172 GTypeModuleClass *module_class = G_TYPE_MODULE_CLASS (
class);
186 g_return_val_if_fail (path != NULL && path[0] !=
'\0', NULL);
190 g_type_module_set_name (G_TYPE_MODULE (result), path);
191 result->
path = g_strdup (path);