From 0260b7c867f72e4e1e5287960e9b4ebd3f607826 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 11 Jul 2014 11:57:04 -0400 Subject: [PATCH] Added a handler for embedded structure values in zwinconstgen.go. --- redo/zwinconstgen.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/redo/zwinconstgen.go b/redo/zwinconstgen.go index f2db8b1..3a9053e 100644 --- a/redo/zwinconstgen.go +++ b/redo/zwinconstgen.go @@ -124,6 +124,10 @@ func winName(t reflect.Type) string { return "uintptr" case reflect.Ptr: 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() }