https://github.com/mattn/go-pointer
https://github.com/mattn/go-pointer
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mattn/go-pointer
- Owner: mattn
- License: mit
- Created: 2016-05-02T14:27:05.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-09-05T23:12:41.000Z (over 5 years ago)
- Last Synced: 2025-03-29T07:04:19.133Z (10 months ago)
- Language: Go
- Size: 8.79 KB
- Stars: 131
- Watchers: 7
- Forks: 32
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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)