| commit | 3fa055feebd116e5063321fd36cf06e0e3b74ac7 | [log] [tgz] |
|---|---|---|
| author | David Symonds <dsymonds@golang.org> | Thu May 05 15:19:04 2011 -0700 |
| committer | David Symonds <dsymonds@golang.org> | Thu May 05 15:19:04 2011 -0700 |
| tree | 9d955f10edd6599bf0ccc9f8caa3d8d73d24bef4 | |
| parent | 53b463d1af393b684bd4301cb3378dc5ba42f133 [diff] [blame] |
goprotobuf: disable some logging, plus some safer unmarshaling. R=r CC=golang-dev http://codereview.appspot.com/4482045
diff --git a/proto/encode.go b/proto/encode.go index 99ea31a..5eab33b 100644 --- a/proto/encode.go +++ b/proto/encode.go
@@ -514,7 +514,7 @@ // Can the object marshal itself? iv := unsafe.Unreflect(p.stype, unsafe.Pointer(&s[i])) if m, ok := iv.(Marshaler); ok { - if reflect.ValueOf(iv).IsNil() { + if isNil(reflect.ValueOf(iv)) { return ErrNil } data, err := m.Marshal()