2
0
mirror of synced 2025-02-24 15:28:28 +00:00
mobile/bind/testdata/issue12403.go.golden
Hyang-Ah (Hana) Kim 671f57b233 bind: fix interface methods' multiple return values handling.
Fixes golang/go#12403

Change-Id: I9b8e6d69beb1ceb27e991348212acb5054497e47
Reviewed-on: https://go-review.googlesource.com/14077
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-08-31 16:32:47 +00:00

60 lines
1.5 KiB
Plaintext

// Package go_issue12403 is an autogenerated binder stub for package issue12403.
// gobind -lang=go issue12403
//
// File is generated by gobind. Do not edit.
package go_issue12403
import (
"golang.org/x/mobile/bind/seq"
"issue12403"
)
const (
proxyParsable_Descriptor = "go.issue12403.Parsable"
proxyParsable_FromJSON_Code = 0x10a
proxyParsable_ToJSON_Code = 0x20a
)
func proxyParsable_FromJSON(out, in *seq.Buffer) {
ref := in.ReadRef()
v := ref.Get().(issue12403.Parsable)
param_jstr := in.ReadString()
res := v.FromJSON(param_jstr)
out.WriteString(res)
}
func proxyParsable_ToJSON(out, in *seq.Buffer) {
ref := in.ReadRef()
v := ref.Get().(issue12403.Parsable)
res, err := v.ToJSON()
out.WriteString(res)
if err == nil {
out.WriteString("")
} else {
out.WriteString(err.Error())
}
}
func init() {
seq.Register(proxyParsable_Descriptor, proxyParsable_FromJSON_Code, proxyParsable_FromJSON)
seq.Register(proxyParsable_Descriptor, proxyParsable_ToJSON_Code, proxyParsable_ToJSON)
}
type proxyParsable seq.Ref
func (p *proxyParsable) FromJSON(jstr string) string {
in := new(seq.Buffer)
in.WriteString(jstr)
out := seq.Transact((*seq.Ref)(p), "go.issue12403.Parsable", proxyParsable_FromJSON_Code, in)
res_0 := out.ReadString()
return res_0
}
func (p *proxyParsable) ToJSON() (string, error) {
in := new(seq.Buffer)
out := seq.Transact((*seq.Ref)(p), "go.issue12403.Parsable", proxyParsable_ToJSON_Code, in)
res_0 := out.ReadString()
res_1 := out.ReadError()
return res_0, res_1
}