You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
4. In `inih.go`, use LLGoPackage to specify the location of the third-party library so that llgo can link to the third-party library. Both `pkg-config --libs inih` and `linih` are used to specify the location of the third-party library.
48
38
49
-
```go
50
-
package inih
39
+
```go
40
+
package inih
51
41
52
-
import (
53
-
// Using go:linkname unsafe is necessary for the next step
54
-
_ "unsafe"
55
-
)
42
+
import (
43
+
_ "unsafe"// unsafe is necessary when using go:linkname
Note that the basic C function type mapping to Go function type can be found at [https://github.com/goplus/llgo/blob/main/doc/Type-Mapping-between-C-and-Go.md](https://github.com/goplus/llgo/blob/main/doc/Type-Mapping-between-C-and-Go.md). Some types requiring special handling are listed at the end of this document for reference.
65
54
66
55
```go
67
56
//go:linkname Parse C.ini_parse
68
57
funcParse(filename *c.Char, handler func(user c.Pointer, section *c.Char, name *c.Char, value *c.Char) c.Int, user c.Pointer) c.Int
0 commit comments