mv _testcgo => _testrt
This commit is contained in:
13
cl/_testrt/cstr/in.go
Normal file
13
cl/_testrt/cstr/in.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package main
|
||||
|
||||
import _ "unsafe"
|
||||
|
||||
//go:linkname cstr llgo.cstr
|
||||
func cstr(string) *int8
|
||||
|
||||
//go:linkname printf C.printf
|
||||
func printf(format *int8, __llgo_va_list ...any)
|
||||
|
||||
func main() {
|
||||
printf(cstr("Hello, world\n"))
|
||||
}
|
||||
Reference in New Issue
Block a user