Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
_example/ | H | 11-Sep-2019 | - | |||
LICENSE | H A D | 11-Sep-2019 | 1.1 KiB | |||
README.md | H A D | 11-Sep-2019 | 404 | |||
doc.go | H A D | 11-Sep-2019 | 16 | |||
pointer.go | H A D | 11-Sep-2019 | 999 |
README.md
1# go-pointer 2 3Utility for cgo 4 5## Usage 6 7https://github.com/golang/proposal/blob/master/design/12416-cgo-pointers.md 8 9In go 1.6, cgo argument can't be passed Go pointer. 10 11``` 12var s string 13C.pass_pointer(pointer.Save(&s)) 14v := *(pointer.Restore(C.get_from_pointer()).(*string)) 15``` 16 17## Installation 18 19``` 20go get github.com/mattn/go-pointer 21``` 22 23## License 24 25MIT 26 27## Author 28 29Yasuhiro Matsumoto (a.k.a mattn) 30