qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kohei Tokunaga <ktokunaga.mail@gmail.com>
To: qemu-devel@nongnu.org
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Thomas Huth" <thuth@redhat.com>, "Kevin Wolf" <kwolf@redhat.com>,
	"Hanna Reitz" <hreitz@redhat.com>,
	"Kohei Tokunaga" <ktokunaga.mail@gmail.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Alexandre Iooss" <erdnaxe@crans.org>,
	"Mahmoud Mandour" <ma.mandourr@gmail.com>,
	"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
	"Pavel Pisa" <pisa@cmp.felk.cvut.cz>,
	"Francisco Iglesias" <francisco.iglesias@amd.com>,
	"Vikram Garhwal" <vikram.garhwal@bytedance.com>,
	"Jason Wang" <jasowang@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Daniel P . Berrangé" <berrange@redhat.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Zhao Liu" <zhao1.liu@intel.com>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Daniel Henrique Barboza" <danielhb413@gmail.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Ilya Leoshkevich" <iii@linux.ibm.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	qemu-block@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org,
	qemu-s390x@nongnu.org
Subject: [PATCH 02/19] qom/object.c: Fix type conflict of GLib function pointers
Date: Wed, 16 Apr 2025 17:14:07 +0900	[thread overview]
Message-ID: <9774bf5ed472be69d5a1e4cd7bbb34184ab0a202.1744787186.git.ktokunaga.mail@gmail.com> (raw)
In-Reply-To: <cover.1744787186.git.ktokunaga.mail@gmail.com>

On emscripten, function pointer casts can cause function call failure.
This commit fixes the function definition to match to the type of the
function call using g_slist_sort_with_data.

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
---
 qom/object.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/qom/object.c b/qom/object.c
index 01618d06bd..87f84bac41 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -1191,7 +1191,7 @@ 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 d)
 {
     return strcasecmp(object_class_get_name((ObjectClass *)a),
                       object_class_get_name((ObjectClass *)b));
@@ -1200,8 +1200,9 @@ static gint object_class_cmp(gconstpointer a, gconstpointer b)
 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);
+    return g_slist_sort_with_data(
+        object_class_get_list(implements_type, include_abstract),
+        object_class_cmp, NULL);
 }
 
 Object *object_ref(void *objptr)
-- 
2.25.1



  parent reply	other threads:[~2025-04-16  8:18 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-16  8:14 [PATCH 00/19] Enable QEMU TCI to run 32bit guests on browsers Kohei Tokunaga
2025-04-16  8:14 ` [PATCH 01/19] hw/core/loader.c: Fix type conflict of GLib function pointers Kohei Tokunaga
2025-04-16  8:28   ` Daniel P. Berrangé
2025-04-16  9:00     ` Paolo Bonzini
2025-04-16  9:12       ` Daniel P. Berrangé
2025-04-16  9:31         ` Paolo Bonzini
2025-04-17  9:18           ` Kohei Tokunaga
2025-04-16  9:14       ` Thomas Huth
2025-04-16  9:35     ` Philippe Mathieu-Daudé
2025-04-17  9:07       ` Kohei Tokunaga
2025-04-16  8:14 ` Kohei Tokunaga [this message]
2025-04-16  8:14 ` [PATCH 03/19] system/vl.c: " Kohei Tokunaga
2025-04-16  8:14 ` [PATCH 04/19] target/arm/helper.c: " Kohei Tokunaga
2025-04-16  8:14 ` [PATCH 05/19] target/i386/cpu.c: " Kohei Tokunaga
2025-04-16  8:14 ` [PATCH 06/19] contrib/plugins: " Kohei Tokunaga
2025-04-16  8:14 ` [PATCH 07/19] hw/net/can: " Kohei Tokunaga
2025-04-16  8:14 ` [PATCH 08/19] target/ppc: " Kohei Tokunaga
2025-04-16  8:14 ` [PATCH 09/19] target/s390x: " Kohei Tokunaga
2025-04-16  8:14 ` [PATCH 10/19] include/glib-compat.h: Poison g_list_sort and g_slist_sort Kohei Tokunaga
2025-04-16 11:56   ` BALATON Zoltan
2025-04-17  9:20     ` Kohei Tokunaga
2025-04-16  8:14 ` [PATCH 11/19] util/cacheflush.c: Update cache flushing mechanism for Emscripten Kohei Tokunaga
2025-04-16  9:37   ` Philippe Mathieu-Daudé
2025-04-17  9:27     ` Kohei Tokunaga
2025-04-17  9:50       ` Philippe Mathieu-Daudé
2025-04-16  8:14 ` [PATCH 12/19] block: Update block to compile with Emscripten Kohei Tokunaga
2025-04-16  9:00   ` Philippe Mathieu-Daudé
2025-04-16  9:33     ` Philippe Mathieu-Daudé
2025-04-16 15:45       ` Richard Henderson
2025-04-17  9:32       ` Kohei Tokunaga
2025-04-17  9:55         ` Philippe Mathieu-Daudé
2025-04-18  6:53           ` Kohei Tokunaga
2025-04-18  9:51             ` Philippe Mathieu-Daudé
2025-04-17  9:43     ` Kohei Tokunaga
2025-04-16  8:14 ` [PATCH 13/19] include/qemu/osdep.h: Add Emscripten-specific OS dependencies Kohei Tokunaga
2025-04-17  9:58   ` Philippe Mathieu-Daudé
2025-04-18  6:55     ` Kohei Tokunaga
2025-04-16  8:14 ` [PATCH 14/19] Disable options unsupported on Emscripten Kohei Tokunaga
2025-04-16  9:03   ` Philippe Mathieu-Daudé
2025-04-17  9:33     ` Kohei Tokunaga
2025-04-16  8:14 ` [PATCH 15/19] util/mmap-alloc: Add qemu_ram_mmap implementation for emscripten Kohei Tokunaga
2025-04-16  9:18   ` Philippe Mathieu-Daudé
2025-04-17  9:35     ` Kohei Tokunaga
2025-04-21  3:23       ` Kohei Tokunaga
2025-04-16  8:14 ` [PATCH 16/19] util: Add coroutine backend " Kohei Tokunaga
2025-04-16  8:14 ` [PATCH 17/19] meson: Add wasm build in build scripts Kohei Tokunaga
2025-04-16  9:22   ` Philippe Mathieu-Daudé
2025-04-17  9:37     ` Kohei Tokunaga
2025-04-16  8:14 ` [PATCH 18/19] gitlab: Enable CI for wasm build Kohei Tokunaga
2025-04-16  9:23   ` Philippe Mathieu-Daudé
2025-04-17  9:39     ` Kohei Tokunaga
2025-04-16  8:14 ` [PATCH 19/19] MAINTAINERS: Update MAINTAINERS file for wasm-related files Kohei Tokunaga
2025-04-16  9:34   ` Philippe Mathieu-Daudé
2025-04-17  9:40     ` Kohei Tokunaga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9774bf5ed472be69d5a1e4cd7bbb34184ab0a202.1744787186.git.ktokunaga.mail@gmail.com \
    --to=ktokunaga.mail@gmail.com \
    --cc=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=danielhb413@gmail.com \
    --cc=david@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=erdnaxe@crans.org \
    --cc=francisco.iglesias@amd.com \
    --cc=hreitz@redhat.com \
    --cc=iii@linux.ibm.com \
    --cc=jasowang@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=ma.mandourr@gmail.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=npiggin@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=pierrick.bouvier@linaro.org \
    --cc=pisa@cmp.felk.cvut.cz \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=stefanha@redhat.com \
    --cc=thuth@redhat.com \
    --cc=vikram.garhwal@bytedance.com \
    --cc=zhao1.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).