github.com/goplus/llgo@v0.8.3/cl/_testrt/fprintf/in.go (about)

     1  package main
     2  
     3  import "unsafe"
     4  
     5  //go:linkname cstr llgo.cstr
     6  func cstr(string) *int8
     7  
     8  //go:linkname stderr __stderrp
     9  var stderr unsafe.Pointer
    10  
    11  //go:linkname fprintf C.fprintf
    12  func fprintf(fp unsafe.Pointer, format *int8, __llgo_va_list ...any)
    13  
    14  func main() {
    15  	fprintf(stderr, cstr("Hello %d\n"), 100)
    16  }