From c9588388d04bb3180c3cfec4359462421c0407f0 Mon Sep 17 00:00:00 2001 From: bptato Date: Sat, 2 Dec 2023 10:56:42 +0100 Subject: Get rid of clang 16 workaround * bindings/quickjs: importc and use correct pointer types * add constcharp module for when it is unavoidable --- src/js/module.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/js') diff --git a/src/js/module.nim b/src/js/module.nim index bae146a7..70755ebd 100644 --- a/src/js/module.nim +++ b/src/js/module.nim @@ -1,3 +1,4 @@ +import bindings/constcharp import bindings/quickjs import js/javascript import js/tojs @@ -23,6 +24,6 @@ proc finishLoadModule*(ctx: JSContext, f: string, name: cstring): JSModuleDef = result = cast[JSModuleDef](JS_VALUE_GET_PTR(funcVal)) JS_FreeValue(ctx, funcVal) -proc normalizeModuleName*(ctx: JSContext, base_name: cstring, name: cstring, +proc normalizeModuleName*(ctx: JSContext, base_name, name: cstringConst, opaque: pointer): cstring {.cdecl.} = - return js_strdup(ctx, name) + return js_strdup(ctx, cstring(name)) -- cgit 1.4.1-2-gfad0