Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / golang.org / x / tools@v0.0.0-20201028153306-37f0764111ff / internal / lsp / testdata / cgo / declarecgo.go
1 package cgo
2
3 /*
4 #include <stdio.h>
5 #include <stdlib.h>
6
7 void myprint(char* s) {
8         printf("%s\n", s);
9 }
10 */
11 import "C"
12
13 import (
14         "fmt"
15         "unsafe"
16 )
17
18 func Example() { //@mark(funccgoexample, "Example"),item(funccgoexample, "Example", "func()", "func")
19         fmt.Println()
20         cs := C.CString("Hello from stdio\n")
21         C.myprint(cs)
22         C.free(unsafe.Pointer(cs))
23 }
24
25 func _() {
26         Example() //@godef("ample", funccgoexample),complete("ample", funccgoexample)
27 }