llgo.string (llgo/ssa.MakeString) fix

This commit is contained in:
xushiwei
2024-06-20 00:30:36 +08:00
parent b4e298230d
commit 4a1712f4cd
3 changed files with 11 additions and 4 deletions

View File

@@ -14,6 +14,8 @@ func f() {
}
func main() {
println(c.GoString(c.Str("sync.Once demo\n"), 9))
println(c.GoString(c.Str("sync.Once demo\n")))
f()
f()
}

View File

@@ -137,6 +137,7 @@ func TestErrBuiltin(t *testing.T) {
test("advance", func(ctx *context) { ctx.advance(nil, nil) })
test("alloca", func(ctx *context) { ctx.alloca(nil, nil) })
test("allocaCStr", func(ctx *context) { ctx.allocaCStr(nil, nil) })
test("string", func(ctx *context) { ctx.string(nil, nil) })
test("stringData", func(ctx *context) { ctx.stringData(nil, nil) })
test("sigsetjmp", func(ctx *context) { ctx.sigsetjmp(nil, nil) })
test("siglongjmp", func(ctx *context) { ctx.siglongjmp(nil, nil) })