static int modcmp(const void *a, const void *b, void *_data)
{
- GTypeModule *ma = G_TYPE_MODULE(a);
- GTypeModule *mb = G_TYPE_MODULE(b);
+ const GTypeModule *ma = a;
+ const GTypeModule *mb = b;
return strcmp(ma->name, mb->name);
}
int module_init(void)
{
if (!initialized) {
- package_tree = avl_create(modcmp, 0, &avl_allocator_default);
+ package_tree = avl_create(modcmp, NULL, NULL);
if (!package_tree) {
fprintf(stderr, "%s: failed to create package tree.\n", __func__);
return -1;
dl_print_errors(__func__);
return -1;
}
+
+ return 0;
}
GType module_get_class(const char *package, const char *class)