cl: go:linkname specifies call convention by C.xxx

This commit is contained in:
xushiwei
2024-04-26 13:09:24 +08:00
parent 33716a3385
commit f86cd74a98
9 changed files with 27 additions and 13 deletions

View File

@@ -8,7 +8,7 @@ func (a T) Add(b T) T {
return a + b
}
//go:linkname printf printf
//go:linkname printf C.printf
func printf(format *int8, __llgo_va_list ...any)
var format = [...]int8{'H', 'e', 'l', 'l', 'o', ' ', '%', 'd', '\n', 0}