From 2c7635205001bbdef99934e5bbe1e574d5bb4d88 Mon Sep 17 00:00:00 2001 From: Ryan Loebs Date: Mon, 27 Jan 2025 17:15:18 -0800 Subject: [PATCH] Allow host functions to be treated as constructors --- c/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/interface.c b/c/interface.c index 39eb0c6b..93abe188 100644 --- a/c/interface.c +++ b/c/interface.c @@ -1069,7 +1069,7 @@ JSValue *QTS_NewFunction(JSContext *ctx, uint32_t func_id, const char *name) { /* JSCFunctionMagic* */ &qts_call_function, /* name */ name, /* min argc */ 0, - /* function type */ JS_CFUNC_generic_magic, + /* function type */ JS_CFUNC_constructor_or_func_magic, /* magic: fn id */ func_id); return jsvalue_to_heap(func_obj); }