Skip to content

Commit eb9fa2b

Browse files
author
Fabrice Bellard
committed
compilation fix for clang
1 parent 42eb279 commit eb9fa2b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

quickjs.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51319,14 +51319,16 @@ int JS_AddIntrinsicMapSet(JSContext *ctx)
5131951319
char buf[ATOM_GET_STR_BUF_SIZE];
5132051320

5132151321
for(i = 0; i < 4; i++) {
51322+
JSCFunctionType ft;
5132251323
const char *name = JS_AtomGetStr(ctx, buf, sizeof(buf),
5132351324
JS_ATOM_Map + i);
51325+
ft.constructor_magic = js_map_constructor;
5132451326
obj1 = JS_NewCConstructor(ctx, JS_CLASS_MAP + i, name,
51325-
(JSCFunction *)js_map_constructor, 0, JS_CFUNC_constructor_magic, i,
51326-
JS_UNDEFINED,
51327-
js_map_funcs, i < 2 ? countof(js_map_funcs) : 0,
51328-
js_map_proto_funcs_ptr[i], js_map_proto_funcs_count[i],
51329-
0);
51327+
ft.generic, 0, JS_CFUNC_constructor_magic, i,
51328+
JS_UNDEFINED,
51329+
js_map_funcs, i < 2 ? countof(js_map_funcs) : 0,
51330+
js_map_proto_funcs_ptr[i], js_map_proto_funcs_count[i],
51331+
0);
5133051332
if (JS_IsException(obj1))
5133151333
return -1;
5133251334
JS_FreeValue(ctx, obj1);

0 commit comments

Comments
 (0)