Added a handler for embedded structure values in zwinconstgen.go.

This commit is contained in:
Pietro Gagliardi 2014-07-11 11:57:04 -04:00
parent 36e8393b46
commit 0260b7c867
1 changed files with 4 additions and 0 deletions

View File

@ -124,6 +124,10 @@ func winName(t reflect.Type) string {
return "uintptr" return "uintptr"
case reflect.Ptr: case reflect.Ptr:
return "*" + winName(t.Elem()) return "*" + winName(t.Elem())
case reflect.Struct:
// the t.Name() will be the cgo-mangled name; get the original name out
parts := strings.Split(t.Name(), "_")
return "s_" + parts[len(parts) - 1]
} }
return t.Kind().String() return t.Kind().String()
} }