Commit eb984f52 authored by Shenghou Ma's avatar Shenghou Ma Committed by Russ Cox

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
parent 370f4e49
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment