46 int success = g_module_supported();
59 if(strchr(library,
'/') == NULL)
61 name = g_module_build_path(NULL, library);
65 name = g_strdup(library);
68 gmodule = g_module_open(
name, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
72 module = (dt_gmodule_t *)malloc(sizeof(dt_gmodule_t));
73 module->gmodule = gmodule;
74 module->library = name;
86 int success = g_module_symbol(module->
gmodule,
name, (gpointer)pointer);
102 void *gmodule = dlopen(library, RTLD_LAZY | RTLD_LOCAL);
106 module = (dt_gmodule_t *)malloc(sizeof(dt_gmodule_t));
107 module->gmodule = gmodule;
108 module->library = g_strdup(library);
int dt_gmodule_symbol(dt_gmodule_t *module, const char *name, void(**pointer)(void))
dt_gmodule_t * dt_gmodule_open(const char *library)
int dt_gmodule_supported(void)
APPLE
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
#define dt_free(ptr)
g_free() ptr and set it to NULL, skipping both if it is already NULL.