From c4ad7bd0230c29bd90a32ed820b3d6e3867fab70 Mon Sep 17 00:00:00 2001 From: Sebastien Binet Date: Wed, 12 Aug 2015 10:25:07 +0200 Subject: [PATCH] bind: change wrap pointer logic (HACK) Change-Id: Idf21382b6b36d253e0ff46d8b86e75f3648ad0ab --- bind/types.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bind/types.go b/bind/types.go index aab36ad..4996473 100644 --- a/bind/types.go +++ b/bind/types.go @@ -21,7 +21,7 @@ type Type interface { } func needWrapType(typ types.Type) bool { - switch typ.(type) { + switch typ := typ.(type) { case *types.Basic: return false case *types.Struct: @@ -45,6 +45,8 @@ func needWrapType(typ types.Type) bool { return wrap case *types.Signature: return true + case *types.Pointer: + return needWrapType(typ.Elem()) } return false }