From f2932932fe2af9c2f4f973de84cb6710e66e778c Mon Sep 17 00:00:00 2001 From: Hugo Melder Date: Mon, 3 Nov 2025 10:48:06 +0100 Subject: [PATCH] Fix declaration of objc_resolve_class WebAssembly is quite sensitive to mismatches between the declaration and definition of a function. While only producing a warning when compiling, the mismatch will result in a crash at runtime. --- dtable.c | 2 +- runtime.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dtable.c b/dtable.c index a6f16417..a2cdc08c 100644 --- a/dtable.c +++ b/dtable.c @@ -677,7 +677,7 @@ LEGACY void update_dispatch_table_for_class(Class cls) objc_update_dtable_for_class(cls); } -void objc_resolve_class(Class); +BOOL objc_resolve_class(Class); __attribute__((unused)) static void objc_release_object_lock(id *x) { diff --git a/runtime.c b/runtime.c index be03c3f7..e6049441 100644 --- a/runtime.c +++ b/runtime.c @@ -22,7 +22,7 @@ #define CHECK_ARG(arg) if (0 == arg) { return 0; } static inline void safe_remove_from_subclass_list(Class cls); -PRIVATE void objc_resolve_class(Class); +PRIVATE BOOL objc_resolve_class(Class); void objc_send_initialize(id object); /**