diff options
| author | Pietro Gagliardi <[email protected]> | 2014-07-11 11:57:04 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-07-11 11:57:04 -0400 |
| commit | 0260b7c867f72e4e1e5287960e9b4ebd3f607826 (patch) | |
| tree | 2580557f2db2fe2e64aa1d1a36edc21a44a34314 | |
| parent | 36e8393b46fe3c7ab2b2eaf775c458ed9d4a7735 (diff) | |
Added a handler for embedded structure values in zwinconstgen.go.
| -rw-r--r-- | redo/zwinconstgen.go | 4 |
1 files changed, 4 insertions, 0 deletions
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() } |
