From c15d8d507971ab7fe5e6778b5a135e1f011c843e Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Tue, 31 Dec 2024 03:02:46 -0300 Subject: [PATCH] use proper type for hs_compile_lit's argument Argument len is size_t, not ulong. Fix the following error on i686-w64-mingw32: compile_v52.go:40:73: cannot use _Ctype_ulong(len(expression)) (value of type _Ctype_ulong) as type _Ctype_uint in variable declaration --- internal/hs/compile_v52.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/hs/compile_v52.go b/internal/hs/compile_v52.go index 2e034cd..f930038 100644 --- a/internal/hs/compile_v52.go +++ b/internal/hs/compile_v52.go @@ -37,7 +37,7 @@ func CompileLit(expression string, flags CompileFlag, mode ModeFlag, info *Platf defer C.free(unsafe.Pointer(expr)) - ret := C.hs_compile_lit(expr, C.uint(flags), C.ulong(len(expression)), C.uint(mode), platform, &db, &err) + ret := C.hs_compile_lit(expr, C.uint(flags), C.size_t(len(expression)), C.uint(mode), platform, &db, &err) if err != nil { defer C.hs_free_compile_error(err)