Fix GLib GCompareFunc type conflict for emscripten

This commit is contained in:
2026-07-20 07:12:55 -04:00
parent a0adc5f6c0
commit 1ff6c3a51e
+3 -2
View File
@@ -1197,7 +1197,8 @@ GSList *object_class_get_list(const char *implements_type,
return list;
}
static gint object_class_cmp(gconstpointer a, gconstpointer b)
static gint object_class_cmp(gconstpointer a, gconstpointer b,
gpointer user_data)
{
return strcasecmp(object_class_get_name((ObjectClass *)a),
object_class_get_name((ObjectClass *)b));
@@ -1207,7 +1208,7 @@ GSList *object_class_get_list_sorted(const char *implements_type,
bool include_abstract)
{
return g_slist_sort(object_class_get_list(implements_type, include_abstract),
object_class_cmp);
(GCompareFunc)object_class_cmp);
}
Object *object_ref(void *objptr)