Accept Java API interface types as arguments and return values from bound Go package functions and methods. Also, allow Go structs to extend Java classes and implement Java interfaces as well as override and implement methods. This is the third and final part of the implementation of the golang/go#16876 proposal. Fixes golang/go#16876 Change-Id: I6951dd87235553ce09abe5117a39a503466163c0 Reviewed-on: https://go-review.googlesource.com/28597 Reviewed-by: David Crawshaw <crawshaw@golang.org>
54 lines
1.1 KiB
Plaintext
54 lines
1.1 KiB
Plaintext
// Package gomobile_bind is an autogenerated binder stub for package issue12328.
|
|
// gobind -lang=go issue12328
|
|
//
|
|
// File is generated by gobind. Do not edit.
|
|
package gomobile_bind
|
|
|
|
/*
|
|
#include <stdlib.h>
|
|
#include <stdint.h>
|
|
#include "seq.h"
|
|
#include "issue12328.h"
|
|
|
|
*/
|
|
import "C"
|
|
|
|
import (
|
|
_seq "golang.org/x/mobile/bind/seq"
|
|
"issue12328"
|
|
)
|
|
|
|
// suppress the error if seq ends up unused
|
|
var _ = _seq.FromRefNum
|
|
|
|
//export proxyissue12328_T_Err_Set
|
|
func proxyissue12328_T_Err_Set(refnum C.int32_t, v C.int32_t) {
|
|
ref := _seq.FromRefNum(int32(refnum))
|
|
var _v error
|
|
_v_ref := _seq.FromRefNum(int32(v))
|
|
if _v_ref != nil {
|
|
if v < 0 { // go object
|
|
_v = _v_ref.Get().(error)
|
|
} else { // foreign object
|
|
_v = (*proxy_error)(_v_ref)
|
|
}
|
|
}
|
|
ref.Get().(*issue12328.T).Err = _v
|
|
}
|
|
|
|
//export proxyissue12328_T_Err_Get
|
|
func proxyissue12328_T_Err_Get(refnum C.int32_t) C.int32_t {
|
|
ref := _seq.FromRefNum(int32(refnum))
|
|
v := ref.Get().(*issue12328.T).Err
|
|
var _v C.int32_t = _seq.NullRefNum
|
|
if v != nil {
|
|
_v = C.int32_t(_seq.ToRefNum(v))
|
|
}
|
|
return _v
|
|
}
|
|
|
|
//export new_issue12328_T
|
|
func new_issue12328_T() C.int32_t {
|
|
return C.int32_t(_seq.ToRefNum(new(issue12328.T)))
|
|
}
|