From eb9fa2b8dac0c7a431ef5255fb55943da78d2f3a Mon Sep 17 00:00:00 2001 From: Fabrice Bellard Date: Sat, 11 Oct 2025 11:13:13 +0200 Subject: [PATCH] compilation fix for clang --- quickjs.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/quickjs.c b/quickjs.c index a5cbcc1..341d806 100644 --- a/quickjs.c +++ b/quickjs.c @@ -51319,14 +51319,16 @@ int JS_AddIntrinsicMapSet(JSContext *ctx) char buf[ATOM_GET_STR_BUF_SIZE]; for(i = 0; i < 4; i++) { + JSCFunctionType ft; const char *name = JS_AtomGetStr(ctx, buf, sizeof(buf), JS_ATOM_Map + i); + ft.constructor_magic = js_map_constructor; obj1 = JS_NewCConstructor(ctx, JS_CLASS_MAP + i, name, - (JSCFunction *)js_map_constructor, 0, JS_CFUNC_constructor_magic, i, - JS_UNDEFINED, - js_map_funcs, i < 2 ? countof(js_map_funcs) : 0, - js_map_proto_funcs_ptr[i], js_map_proto_funcs_count[i], - 0); + ft.generic, 0, JS_CFUNC_constructor_magic, i, + JS_UNDEFINED, + js_map_funcs, i < 2 ? countof(js_map_funcs) : 0, + js_map_proto_funcs_ptr[i], js_map_proto_funcs_count[i], + 0); if (JS_IsException(obj1)) return -1; JS_FreeValue(ctx, obj1);