~john-koepi/ubuntu/trusty/golang/default

« back to all changes in this revision

Viewing changes to src/pkg/gob/type.go

  • Committer: Bazaar Package Importer
  • Author(s): Ondřej Surý
  • Date: 2011-08-03 17:04:59 UTC
  • mfrom: (14.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110803170459-wzd99m3567y80ila
Tags: 1:59-1
* Imported Upstream version 59
* Refresh patches to a new release
* Fix FTBFS on ARM (Closes: #634270)
* Update version.bash to work with Debian packaging and not hg
  repository

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
                ut.base = pt.Elem()
68
68
                if ut.base == slowpoke { // ut.base lapped slowpoke
69
69
                        // recursive pointer type.
70
 
                        return nil, os.ErrorString("can't represent recursive pointer type " + ut.base.String())
 
70
                        return nil, os.NewError("can't represent recursive pointer type " + ut.base.String())
71
71
                }
72
72
                if ut.indir%2 == 0 {
73
73
                        slowpoke = slowpoke.Elem()
80
80
        return
81
81
}
82
82
 
83
 
const (
84
 
        gobEncodeMethodName = "GobEncode"
85
 
        gobDecodeMethodName = "GobDecode"
86
 
)
87
 
 
88
83
var (
89
84
        gobEncoderInterfaceType = reflect.TypeOf(new(GobEncoder)).Elem()
90
85
        gobDecoderInterfaceType = reflect.TypeOf(new(GobDecoder)).Elem()
508
503
                return st, nil
509
504
 
510
505
        default:
511
 
                return nil, os.ErrorString("gob NewTypeObject can't handle type: " + rt.String())
 
506
                return nil, os.NewError("gob NewTypeObject can't handle type: " + rt.String())
512
507
        }
513
508
        return nil, nil
514
509
}