]> git.kaiwu.me - quickjs.git/commitdiff
compilation fix
authorFabrice Bellard <fabrice@bellard.org>
Fri, 16 May 2025 18:48:01 +0000 (20:48 +0200)
committerFabrice Bellard <fabrice@bellard.org>
Fri, 16 May 2025 18:48:01 +0000 (20:48 +0200)
quickjs.c

index 7907af52bb78527ce39db99255ca683b5e971935..b524353a9464ba8a507727fd19756182d6b705b5 100644 (file)
--- a/quickjs.c
+++ b/quickjs.c
@@ -49216,8 +49216,8 @@ static JSValue js_promise_withResolvers(JSContext *ctx,
     return obj;
 }
 
-static JSValue js_promise_try(JSContext *ctx, JSValue this_val,
-                              int argc, JSValue *argv)
+static JSValue js_promise_try(JSContext *ctx, JSValueConst this_val,
+                              int argc, JSValueConst *argv)
 {
     JSValue result_promise, resolving_funcs[2], ret, ret2;
     BOOL is_reject = 0;
@@ -49232,7 +49232,7 @@ static JSValue js_promise_try(JSContext *ctx, JSValue this_val,
         is_reject = 1;
         ret = JS_GetException(ctx);
     }
-    ret2 = JS_Call(ctx, resolving_funcs[is_reject], JS_UNDEFINED, 1, &ret);
+    ret2 = JS_Call(ctx, resolving_funcs[is_reject], JS_UNDEFINED, 1, (JSValueConst *)&ret);
     JS_FreeValue(ctx, resolving_funcs[0]);
     JS_FreeValue(ctx, resolving_funcs[1]);
     JS_FreeValue(ctx, ret);