From 3419a65f2d4000a401e77217a1d6d00c6578ed09 Mon Sep 17 00:00:00 2001 From: bptato Date: Sat, 2 Mar 2024 18:11:42 +0100 Subject: quickjs: reduce diff with upstream * the uint8array thing is probably from txiki.js, but we never used it * upstream now has JS_GetClassID, importing that instead... (so this commit won't build :/) --- src/js/fromjs.nim | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/js/fromjs.nim') diff --git a/src/js/fromjs.nim b/src/js/fromjs.nim index f0ff8a91..112efd75 100644 --- a/src/js/fromjs.nim +++ b/src/js/fromjs.nim @@ -76,9 +76,6 @@ func fromJSString(ctx: JSContext, val: JSValue): JSResult[string] = JS_FreeCString(ctx, outp) return ok(ret) -func fromJSString2(ctx: JSContext, val: JSValue): JSResult[JSString] = - return ok(JS_VALUE_GET_STRING(val)) - func fromJSInt[T: SomeInteger](ctx: JSContext, val: JSValue): JSResult[T] = when T is int: @@ -477,8 +474,6 @@ type FromJSAllowedT = (object and not (Result|Option|Table|JSValue|JSDict| proc fromJS*[T](ctx: JSContext, val: JSValue): JSResult[T] = when T is string: return fromJSString(ctx, val) - elif T is JSString: - return fromJSString2(ctx, val) elif T is (proc): return fromJSFunction[T](ctx, val) elif T is Option: -- cgit 1.4.1-2-gfad0