mirror of
https://github.com/golang/go
synced 2024-11-21 21:44:40 -07:00
cgo: -cdefs should translate unsafe.Pointer to void *
Fixes #2454. R=rsc, mikioh.mikioh, golang-dev, iant, iant CC=golang-dev https://golang.org/cl/5557068
This commit is contained in:
parent
370f4e49cd
commit
eb984f524e
@ -268,6 +268,11 @@ func cdecl(name, typ string) string {
|
||||
typ = typ[i:]
|
||||
}
|
||||
// X T -> T X
|
||||
// Handle the special case: 'unsafe.Pointer' is 'void *'
|
||||
if typ == "unsafe.Pointer" {
|
||||
typ = "void"
|
||||
name = "*" + name
|
||||
}
|
||||
return typ + "\t" + name
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user