File: README.md

package info (click to toggle)
golang-github-mattn-go-pointer 0.0~git20180825.49522c3-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 60 kB
  • sloc: ansic: 6; makefile: 2
file content (29 lines) | stat: -rw-r--r-- 404 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# go-pointer

Utility for cgo

## Usage

https://github.com/golang/proposal/blob/master/design/12416-cgo-pointers.md

In go 1.6, cgo argument can't be passed Go pointer.

```
var s string
C.pass_pointer(pointer.Save(&s))
v := *(pointer.Restore(C.get_from_pointer()).(*string))
```

## Installation

```
go get github.com/mattn/go-pointer
```

## License

MIT

## Author

Yasuhiro Matsumoto (a.k.a mattn)