Skip to content

Instantly share code, notes, and snippets.

@8tt
Created February 21, 2017 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 8tt/57750ee50cf2f69c1f9b53a090700ec6 to your computer and use it in GitHub Desktop.
Save 8tt/57750ee50cf2f69c1f9b53a090700ec6 to your computer and use it in GitHub Desktop.
gomobile-test
ok golang.org/x/mobile/app 0.026s
? golang.org/x/mobile/app/internal/apptest [no test files]
? golang.org/x/mobile/app/internal/testapp [no test files]
? golang.org/x/mobile/asset [no test files]
# golang.org/x/mobile/exp/gl/glutil
exp/gl/glutil/glimage_test.go:35: undefined: gl.WorkAvailable
exp/gl/glutil/glimage_test.go:36: undefined: gl.DoWork
exp/gl/glutil/glimage_test.go:47: undefined: start
exp/gl/glutil/glimage_test.go:48: undefined: stop
exp/gl/glutil/glimage_test.go:81: undefined: gl.CreateFramebuffer
exp/gl/glutil/glimage_test.go:82: undefined: gl.BindFramebuffer
exp/gl/glutil/glimage_test.go:83: undefined: gl.CreateRenderbuffer
exp/gl/glutil/glimage_test.go:84: undefined: gl.BindRenderbuffer
exp/gl/glutil/glimage_test.go:88: undefined: gl.RenderbufferStorage
exp/gl/glutil/glimage_test.go:89: undefined: gl.FramebufferRenderbuffer
exp/gl/glutil/glimage_test.go:89: too many errors
ok golang.org/x/mobile/bind 49.528s
? golang.org/x/mobile/bind/benchmark [no test files]
ok golang.org/x/mobile/bind/java 0.015s
ok golang.org/x/mobile/bind/objc 260.398s
ok golang.org/x/mobile/bind/seq 0.016s
? golang.org/x/mobile/bind/testpkg [no test files]
? golang.org/x/mobile/bind/testpkg/secondpkg [no test files]
? golang.org/x/mobile/bind/testpkg/simplepkg [no test files]
? golang.org/x/mobile/bind/testpkg/unboundpkg [no test files]
--- FAIL: TestGobind (32.65s)
--- FAIL: TestGobind/ObjC-Testpkg (0.04s)
gobind_test.go:52: gobind -lang objc golang.org/x/mobile/bind/testpkg failed: exit status 1: unsupported basic type: invalid type
// Objective-C API for talking to testpkg Go package.
// gobind -lang=objc testpkg
//
// File is generated by gobind. Do not edit.
#ifndef __testpkg_H__
#define __testpkg_H__
#include <stdint.h>
#include <objc/objc.h>
void cproxytestpkg_B_B(int32_t refnum, nbyteslice b);
int32_t cproxytestpkg_ConcreteDupper_CDup(int32_t refnum, int32_t c);
int32_t cproxytestpkg_EmptyErrorer_EmptyError(int32_t refnum);
void cproxytestpkg_GoCallback_VarUpdate(int32_t refnum);
int32_t cproxytestpkg_I_E(int32_t refnum);
void cproxytestpkg_I_F(int32_t refnum);
int32_t cproxytestpkg_I_I(int32_t refnum);
int32_t cproxytestpkg_I_S(int32_t refnum);
nstring cproxytestpkg_I_StoString(int32_t refnum, int32_t seq);
nstring cproxytestpkg_I_String(int32_t refnum);
nint cproxytestpkg_I_V(int32_t refnum);
typedef struct cproxytestpkg_I_VE_return {
nint r0;
int32_t r1;
} cproxytestpkg_I_VE_return;
struct cproxytestpkg_I_VE_return cproxytestpkg_I_VE(int32_t refnum);
int32_t cproxytestpkg_I2_Error(int32_t refnum, char triggerError);
typedef struct cproxytestpkg_I2_StringError_return {
nstring r0;
int32_t r1;
} cproxytestpkg_I2_StringError_return;
struct cproxytestpkg_I2_StringError_return cproxytestpkg_I2_StringError(int32_t refnum, nstring s);
int64_t cproxytestpkg_I2_Times(int32_t refnum, int32_t v);
void cproxytestpkg_ImportedI_F(int32_t refnum, TODO p0);
void cproxytestpkg_Interface_F(int32_t refnum);
int32_t cproxytestpkg_InterfaceDupper_IDup(int32_t refnum, int32_t i);
void cproxytestpkg_Issue14168_F(int32_t refnum, int32_t seq);
void cproxytestpkg_Issue17073_OnError(int32_t refnum, int32_t err);
int32_t cproxytestpkg_NullTest_Null(int32_t refnum);
void cproxytestpkg_Nummer_Num(int32_t refnum);
void cproxytestpkg_Receiver_Hello(int32_t refnum, nstring message);
#endif
unsupported basic type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported type: invalid type
// Objective-C API for talking to testpkg Go package.
// gobind -lang=objc testpkg
//
// File is generated by gobind. Do not edit.
#ifndef __Testpkg_H__
#define __Testpkg_H__
@import Foundation;
#include "Universe.objc.h"
@class TestpkgAnSer;
@class TestpkgConcrete;
@class TestpkgImportedFields;
@class TestpkgInitCaller;
@class TestpkgNode;
@class TestpkgNullFieldStruct;
@class TestpkgS;
@class TestpkgS2;
@class TestpkgS3;
@class TestpkgS4;
@protocol TestpkgB;
@class TestpkgB;
@protocol TestpkgConcreteDupper;
@class TestpkgConcreteDupper;
@protocol TestpkgEmptyErrorer;
@class TestpkgEmptyErrorer;
@protocol TestpkgGoCallback;
@class TestpkgGoCallback;
@protocol TestpkgI;
@class TestpkgI;
@protocol TestpkgI2;
@class TestpkgI2;
@protocol TestpkgImportedI;
@class TestpkgImportedI;
@protocol TestpkgInterface;
@class TestpkgInterface;
@protocol TestpkgInterfaceDupper;
@class TestpkgInterfaceDupper;
@protocol TestpkgIssue14168;
@class TestpkgIssue14168;
@protocol TestpkgIssue17073;
@class TestpkgIssue17073;
@protocol TestpkgNullTest;
@class TestpkgNullTest;
@protocol TestpkgNummer;
@class TestpkgNummer;
@protocol TestpkgReceiver;
@class TestpkgReceiver;
@interface TestpkgAnSer : NSObject <goSeqRefInterface> {
}
@property(strong, readonly) id _ref;
- (id)initWithRef:(id)ref;
// skipped method AnSer.S with unsupported parameter or return types
@end
@interface TestpkgConcrete : NSObject <goSeqRefInterface> {
}
@property(strong, readonly) id _ref;
- (id)initWithRef:(id)ref;
- (void)f;
@end
@interface TestpkgImportedFields : NSObject <goSeqRefInterface> {
}
@property(strong, readonly) id _ref;
- (id)initWithRef:(id)ref;
- (TODO)i;
- (void)setI:(TODO)v;
// skipped field ImportedFields.S with unsupported type: *types.Pointer
@end
@interface TestpkgInitCaller : NSObject <goSeqRefInterface> {
}
@property(strong, readonly) id _ref;
- (id)initWithRef:(id)ref;
- (void)init_;
@end
@interface TestpkgNode : NSObject <goSeqRefInterface> {
}
@property(strong, readonly) id _ref;
- (id)initWithRef:(id)ref;
- (NSString*)v;
- (void)setV:(NSString*)v;
- (TestpkgNode*)next;
- (void)setNext:(TestpkgNode*)v;
- (NSError*)err;
- (void)setErr:(NSError*)v;
- (NSString*)string;
@end
@interface TestpkgNullFieldStruct : NSObject <goSeqRefInterface> {
}
@property(strong, readonly) id _ref;
- (id)initWithRef:(id)ref;
- (TestpkgS*)f;
- (void)setF:(TestpkgS*)v;
@end
@interface TestpkgS : NSObject <goSeqRefInterface> {
}
@property(strong, readonly) id _ref;
- (id)initWithRef:(id)ref;
- (void)f;
- (NSString*)string;
@end
@interface TestpkgS2 : NSObject <goSeqRefInterface> {
}
@property(strong, readonly) id _ref;
- (id)initWithRef:(id)ref;
- (double)x;
- (void)setX:(double)v;
- (double)y;
- (void)setY:(double)v;
- (double)sum;
- (NSString*)tryTwoStrings:(NSString*)first second:(NSString*)second;
@end
@interface TestpkgS3 : NSObject <goSeqRefInterface> {
}
@property(strong, readonly) id _ref;
- (id)initWithRef:(id)ref;
@end
@interface TestpkgS4 : NSObject <goSeqRefInterface> {
}
@property(strong, readonly) id _ref;
- (id)initWithRef:(id)ref;
- (long)i;
- (void)setI:(long)v;
@end
@protocol TestpkgB <NSObject>
- (void)b:(NSData*)b;
@end
@protocol TestpkgConcreteDupper <NSObject>
- (TestpkgConcrete*)cDup:(TestpkgConcrete*)c;
@end
@protocol TestpkgEmptyErrorer <NSObject>
- (BOOL)emptyError:(NSError**)error;
@end
@protocol TestpkgGoCallback <NSObject>
- (void)varUpdate;
@end
@protocol TestpkgI <NSObject>
- (BOOL)e:(NSError**)error;
- (void)f;
- (id<TestpkgI>)i;
- (TestpkgS*)s;
- (NSString*)stoString:(TestpkgS*)seq;
- (NSString*)string;
- (long)v;
- (BOOL)ve:(long*)ret0_ error:(NSError**)error;
@end
@protocol TestpkgI2 <NSObject>
- (BOOL)error:(BOOL)triggerError error:(NSError**)error;
- (NSString*)stringError:(NSString*)s error:(NSError**)error;
- (int64_t)times:(int32_t)v;
@end
@protocol TestpkgImportedI <NSObject>
- (void)f:(TODO)p0;
@end
@protocol TestpkgInterface <NSObject>
- (void)f;
@end
@protocol TestpkgInterfaceDupper <NSObject>
- (id<TestpkgInterface>)iDup:(id<TestpkgInterface>)i;
@end
@protocol TestpkgIssue14168 <NSObject>
- (void)f:(int32_t)seq;
@end
@protocol TestpkgIssue17073 <NSObject>
- (void)onError:(NSError*)err;
@end
@protocol TestpkgNullTest <NSObject>
- (id<TestpkgNullTest>)null;
@end
@protocol TestpkgNummer <NSObject>
- (void)num;
@end
@protocol TestpkgReceiver <NSObject>
- (void)hello:(NSString*)message;
@end
FOUNDATION_EXPORT const BOOL TestpkgABool;
FOUNDATION_EXPORT const double TestpkgAFloat;
FOUNDATION_EXPORT NSString* const TestpkgAString;
FOUNDATION_EXPORT const int64_t TestpkgAnInt;
FOUNDATION_EXPORT const double TestpkgLog2E;
FOUNDATION_EXPORT const float TestpkgMaxFloat32;
FOUNDATION_EXPORT const double TestpkgMaxFloat64;
FOUNDATION_EXPORT const int32_t TestpkgMaxInt32;
FOUNDATION_EXPORT const int64_t TestpkgMaxInt64;
FOUNDATION_EXPORT const int32_t TestpkgMinInt32;
FOUNDATION_EXPORT const int64_t TestpkgMinInt64;
FOUNDATION_EXPORT const float TestpkgSmallestNonzeroFloat32;
FOUNDATION_EXPORT const double TestpkgSmallestNonzeroFloat64;
@interface Testpkg : NSObject
+ (NSError*) globalErr;
+ (void) setGlobalErr:(NSError*)v;
+ (TODO) importedVarI;
+ (void) setImportedVarI:(TODO)v;
// skipped variable ImportedVarS with unsupported type: *types.Pointer
+ (long) intVar;
+ (void) setIntVar:(long)v;
+ (id<TestpkgI>) interfaceVar;
+ (void) setInterfaceVar:(id<TestpkgI>)v;
+ (id<TestpkgI2>) interfaceVar2;
+ (void) setInterfaceVar2:(id<TestpkgI2>)v;
+ (TestpkgNode*) nodeVar;
+ (void) setNodeVar:(TestpkgNode*)v;
+ (NSString*) stringVar;
+ (void) setStringVar:(NSString*)v;
+ (TestpkgS*) structVar;
+ (void) setStructVar:(TestpkgS*)v;
@end
FOUNDATION_EXPORT long TestpkgAdd(long x, long y);
FOUNDATION_EXPORT NSString* TestpkgAppendHello(NSString* s);
FOUNDATION_EXPORT NSData* TestpkgAppendToString(NSString* str, NSData* someBytes);
FOUNDATION_EXPORT NSData* TestpkgBytesAppend(NSData* a, NSData* b);
FOUNDATION_EXPORT BOOL TestpkgCallCDupper(id<TestpkgConcreteDupper> d);
FOUNDATION_EXPORT BOOL TestpkgCallE(id<TestpkgI> i, NSError** error);
FOUNDATION_EXPORT BOOL TestpkgCallEmptyError(id<TestpkgEmptyErrorer> c, NSError** error);
FOUNDATION_EXPORT void TestpkgCallF(id<TestpkgI> i);
FOUNDATION_EXPORT id<TestpkgI> TestpkgCallI(id<TestpkgI> i);
FOUNDATION_EXPORT BOOL TestpkgCallIDupper(id<TestpkgInterfaceDupper> d);
FOUNDATION_EXPORT BOOL TestpkgCallIError(id<TestpkgI2> i, BOOL triggerError, NSError** error);
FOUNDATION_EXPORT NSString* TestpkgCallIStringError(id<TestpkgI2> i, NSString* s, NSError** error);
FOUNDATION_EXPORT void TestpkgCallImportedI(TODO i);
FOUNDATION_EXPORT TestpkgS* TestpkgCallS(id<TestpkgI> i);
FOUNDATION_EXPORT double TestpkgCallSSum(TestpkgS2* s);
FOUNDATION_EXPORT long TestpkgCallV(id<TestpkgI> i);
FOUNDATION_EXPORT BOOL TestpkgCallVE(id<TestpkgI> i, long* ret0_, NSError** error);
FOUNDATION_EXPORT void TestpkgCallWithCallback(id<TestpkgGoCallback> gcb);
FOUNDATION_EXPORT BOOL TestpkgCallWithNull(id<TestpkgNullTest> p0, id<TestpkgNullTest> nuller);
FOUNDATION_EXPORT long TestpkgCollectS2(long want, long timeoutSec);
FOUNDATION_EXPORT BOOL TestpkgEmptyError(NSError** error);
FOUNDATION_EXPORT BOOL TestpkgErr(NSString* s, NSError** error);
FOUNDATION_EXPORT NSString* TestpkgErrorMessage(NSError* err);
FOUNDATION_EXPORT void TestpkgGC();
FOUNDATION_EXPORT void TestpkgGarbageCollect();
FOUNDATION_EXPORT void TestpkgGoroutineCallback(id<TestpkgReceiver> r);
FOUNDATION_EXPORT void TestpkgHello(id<TestpkgReceiver> r, NSString* name);
FOUNDATION_EXPORT void TestpkgHi();
FOUNDATION_EXPORT id<TestpkgI2> TestpkgI2Dup(id<TestpkgI2> i);
FOUNDATION_EXPORT id<TestpkgI> TestpkgIDup(id<TestpkgI> i);
FOUNDATION_EXPORT void TestpkgInit();
FOUNDATION_EXPORT void TestpkgInt(int32_t x);
FOUNDATION_EXPORT BOOL TestpkgIsGlobalErr(NSError* err);
FOUNDATION_EXPORT void TestpkgKeep(id<TestpkgI> i);
FOUNDATION_EXPORT int64_t TestpkgMultiply(int32_t idx, int32_t val);
FOUNDATION_EXPORT BOOL TestpkgNegate(BOOL x);
FOUNDATION_EXPORT TestpkgS* TestpkgNew();
FOUNDATION_EXPORT TestpkgConcrete* TestpkgNewConcrete();
FOUNDATION_EXPORT id<TestpkgI2> TestpkgNewI();
FOUNDATION_EXPORT TestpkgImportedFields* TestpkgNewImportedFields();
FOUNDATION_EXPORT TODO TestpkgNewImportedI();
// skipped function NewImportedS with unsupported parameter or return types
FOUNDATION_EXPORT TestpkgInitCaller* TestpkgNewInitCaller();
FOUNDATION_EXPORT TestpkgNode* TestpkgNewNode(NSString* name);
FOUNDATION_EXPORT TestpkgNullFieldStruct* TestpkgNewNullFieldStruct();
FOUNDATION_EXPORT id<TestpkgI> TestpkgNewNullInterface();
FOUNDATION_EXPORT TestpkgS* TestpkgNewNullStruct();
FOUNDATION_EXPORT TestpkgS2* TestpkgNewS2(double x, double y);
FOUNDATION_EXPORT TestpkgS4* TestpkgNewS4WithBoolAndError(BOOL b, NSError** error);
FOUNDATION_EXPORT TestpkgS4* TestpkgNewS4WithFloat(double f);
FOUNDATION_EXPORT TestpkgS4* TestpkgNewS4WithInt(long i);
FOUNDATION_EXPORT TestpkgAnSer* TestpkgNewSer();
// skipped function NewSimpleS with unsupported parameter or return types
FOUNDATION_EXPORT long TestpkgNumSCollected();
FOUNDATION_EXPORT void TestpkgPassByteArray(id<TestpkgB> b);
FOUNDATION_EXPORT NSString* TestpkgReadAsset();
FOUNDATION_EXPORT BOOL TestpkgReadIntoByteArray(NSData* s, long* ret0_, NSError** error);
FOUNDATION_EXPORT void TestpkgRegisterI(int32_t idx, id<TestpkgI2> i);
FOUNDATION_EXPORT NSString* TestpkgReturnsError(BOOL b, NSError** error);
FOUNDATION_EXPORT NSString* TestpkgStrDup(NSString* s);
FOUNDATION_EXPORT void TestpkgTestSIGPIPE();
FOUNDATION_EXPORT void TestpkgUnboundI(TODO p0);
// skipped function UnboundS with unsupported parameter or return types
FOUNDATION_EXPORT long TestpkgUnnamedParams(long p0, long p1, NSString* p2);
FOUNDATION_EXPORT void TestpkgUnregisterI(int32_t idx);
FOUNDATION_EXPORT TODO TestpkgWithImportedI(TODO i);
// skipped function WithImportedS with unsupported parameter or return types
@class TestpkgB;
@class TestpkgConcreteDupper;
@class TestpkgEmptyErrorer;
@class TestpkgGoCallback;
@class TestpkgI;
@class TestpkgI2;
@class TestpkgImportedI;
@class TestpkgInterface;
@class TestpkgInterfaceDupper;
@class TestpkgIssue14168;
@class TestpkgIssue17073;
@class TestpkgNullTest;
@class TestpkgNummer;
@class TestpkgReceiver;
@interface TestpkgB : NSObject <goSeqRefInterface, TestpkgB> {
}
@property(strong, readonly) id _ref;
- (instancetype)initWithRef:(id)ref;
- (void)b:(NSData*)b;
@end
@interface TestpkgConcreteDupper : NSObject <goSeqRefInterface, TestpkgConcreteDupper> {
}
@property(strong, readonly) id _ref;
- (instancetype)initWithRef:(id)ref;
- (TestpkgConcrete*)cDup:(TestpkgConcrete*)c;
@end
@interface TestpkgEmptyErrorer : NSObject <goSeqRefInterface, TestpkgEmptyErrorer> {
}
@property(strong, readonly) id _ref;
- (instancetype)initWithRef:(id)ref;
- (BOOL)emptyError:(NSError**)error;
@end
@interface TestpkgGoCallback : NSObject <goSeqRefInterface, TestpkgGoCallback> {
}
@property(strong, readonly) id _ref;
- (instancetype)initWithRef:(id)ref;
- (void)varUpdate;
@end
@interface TestpkgI : NSObject <goSeqRefInterface, TestpkgI> {
}
@property(strong, readonly) id _ref;
- (instancetype)initWithRef:(id)ref;
- (BOOL)e:(NSError**)error;
- (void)f;
- (id<TestpkgI>)i;
- (TestpkgS*)s;
- (NSString*)stoString:(TestpkgS*)seq;
- (NSString*)string;
- (long)v;
- (BOOL)ve:(long*)ret0_ error:(NSError**)error;
@end
@interface TestpkgI2 : NSObject <goSeqRefInterface, TestpkgI2> {
}
@property(strong, readonly) id _ref;
- (instancetype)initWithRef:(id)ref;
- (BOOL)error:(BOOL)triggerError error:(NSError**)error;
- (NSString*)stringError:(NSString*)s error:(NSError**)error;
- (int64_t)times:(int32_t)v;
@end
@interface TestpkgImportedI : NSObject <goSeqRefInterface, TestpkgImportedI> {
}
@property(strong, readonly) id _ref;
- (instancetype)initWithRef:(id)ref;
- (void)f:(TODO)p0;
@end
@interface TestpkgInterface : NSObject <goSeqRefInterface, TestpkgInterface> {
}
@property(strong, readonly) id _ref;
- (instancetype)initWithRef:(id)ref;
- (void)f;
@end
@interface TestpkgInterfaceDupper : NSObject <goSeqRefInterface, TestpkgInterfaceDupper> {
}
@property(strong, readonly) id _ref;
- (instancetype)initWithRef:(id)ref;
- (id<TestpkgInterface>)iDup:(id<TestpkgInterface>)i;
@end
@interface TestpkgIssue14168 : NSObject <goSeqRefInterface, TestpkgIssue14168> {
}
@property(strong, readonly) id _ref;
- (instancetype)initWithRef:(id)ref;
- (void)f:(int32_t)seq;
@end
@interface TestpkgIssue17073 : NSObject <goSeqRefInterface, TestpkgIssue17073> {
}
@property(strong, readonly) id _ref;
- (instancetype)initWithRef:(id)ref;
- (void)onError:(NSError*)err;
@end
@interface TestpkgNullTest : NSObject <goSeqRefInterface, TestpkgNullTest> {
}
@property(strong, readonly) id _ref;
- (instancetype)initWithRef:(id)ref;
- (id<TestpkgNullTest>)null;
@end
@interface TestpkgNummer : NSObject <goSeqRefInterface, TestpkgNummer> {
}
@property(strong, readonly) id _ref;
- (instancetype)initWithRef:(id)ref;
- (void)num;
@end
@interface TestpkgReceiver : NSObject <goSeqRefInterface, TestpkgReceiver> {
}
@property(strong, readonly) id _ref;
- (instancetype)initWithRef:(id)ref;
- (void)hello:(NSString*)message;
@end
#endif
unsupported basic type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported basic type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported type: invalid type
unsupported basic type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported type: invalid type
unsupported type: invalid type
unsupported basic type: invalid type
unsupported type: invalid type
unsupported type: invalid type
// Objective-C API for talking to testpkg Go package.
// gobind -lang=objc testpkg
//
// File is generated by gobind. Do not edit.
#include <Foundation/Foundation.h>
#include "seq.h"
#include "_cgo_export.h"
#include "Testpkg.objc.h"
@implementation TestpkgAnSer {
}
- (id)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
// skipped method AnSer.S with unsupported parameter or return types
@end
@implementation TestpkgConcrete {
}
- (id)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
- (void)f {
int32_t refnum = go_seq_go_to_refnum(self._ref);
proxytestpkg_Concrete_F(refnum);
}
@end
@implementation TestpkgImportedFields {
}
- (id)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
- (TODO)i {
int32_t refnum = go_seq_go_to_refnum(self._ref);
TODO r0 = proxytestpkg_ImportedFields_I_Get(refnum);
TODO _r0 = (TODO)r0;
return _r0;
}
- (void)setI:(TODO)v {
int32_t refnum = go_seq_go_to_refnum(self._ref);
TODO _v = (TODO)v;
proxytestpkg_ImportedFields_I_Set(refnum, _v);
}
// skipped unsupported field S with type *types.Var
@end
@implementation TestpkgInitCaller {
}
- (id)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
- (void)init_ {
int32_t refnum = go_seq_go_to_refnum(self._ref);
proxytestpkg_InitCaller_Init(refnum);
}
@end
@implementation TestpkgNode {
}
- (id)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
- (NSString*)v {
int32_t refnum = go_seq_go_to_refnum(self._ref);
nstring r0 = proxytestpkg_Node_V_Get(refnum);
NSString *_r0 = go_seq_to_objc_string(r0);
return _r0;
}
- (void)setV:(NSString*)v {
int32_t refnum = go_seq_go_to_refnum(self._ref);
nstring _v = go_seq_from_objc_string(v);
proxytestpkg_Node_V_Set(refnum, _v);
}
- (TestpkgNode*)next {
int32_t refnum = go_seq_go_to_refnum(self._ref);
int32_t r0 = proxytestpkg_Node_Next_Get(refnum);
TestpkgNode* _r0 = nil;
GoSeqRef* _r0_ref = go_seq_from_refnum(r0);
if (_r0_ref != NULL) {
_r0 = _r0_ref.obj;
if (_r0 == nil) {
_r0 = [[TestpkgNode alloc] initWithRef:_r0_ref];
}
}
return _r0;
}
- (void)setNext:(TestpkgNode*)v {
int32_t refnum = go_seq_go_to_refnum(self._ref);
int32_t _v;
if ([v conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> v_proxy = (id<goSeqRefInterface>)(v);
_v = go_seq_go_to_refnum(v_proxy._ref);
} else {
_v = go_seq_to_refnum(v);
}
proxytestpkg_Node_Next_Set(refnum, _v);
}
- (NSError*)err {
int32_t refnum = go_seq_go_to_refnum(self._ref);
int32_t r0 = proxytestpkg_Node_Err_Get(refnum);
Universeerror* _r0 = nil;
GoSeqRef* _r0_ref = go_seq_from_refnum(r0);
if (_r0_ref != NULL) {
_r0 = _r0_ref.obj;
if (_r0 == nil) {
_r0 = [[Universeerror alloc] initWithRef:_r0_ref];
}
}
return _r0;
}
- (void)setErr:(NSError*)v {
int32_t refnum = go_seq_go_to_refnum(self._ref);
int32_t _v;
if ([v conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> v_proxy = (id<goSeqRefInterface>)(v);
_v = go_seq_go_to_refnum(v_proxy._ref);
} else {
_v = go_seq_to_refnum(v);
}
proxytestpkg_Node_Err_Set(refnum, _v);
}
- (NSString*)string {
int32_t refnum = go_seq_go_to_refnum(self._ref);
nstring r0 = proxytestpkg_Node_String(refnum);
NSString *_ret0_ = go_seq_to_objc_string(r0);
return _ret0_;
}
@end
@implementation TestpkgNullFieldStruct {
}
- (id)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
- (TestpkgS*)f {
int32_t refnum = go_seq_go_to_refnum(self._ref);
int32_t r0 = proxytestpkg_NullFieldStruct_F_Get(refnum);
TestpkgS* _r0 = nil;
GoSeqRef* _r0_ref = go_seq_from_refnum(r0);
if (_r0_ref != NULL) {
_r0 = _r0_ref.obj;
if (_r0 == nil) {
_r0 = [[TestpkgS alloc] initWithRef:_r0_ref];
}
}
return _r0;
}
- (void)setF:(TestpkgS*)v {
int32_t refnum = go_seq_go_to_refnum(self._ref);
int32_t _v;
if ([v conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> v_proxy = (id<goSeqRefInterface>)(v);
_v = go_seq_go_to_refnum(v_proxy._ref);
} else {
_v = go_seq_to_refnum(v);
}
proxytestpkg_NullFieldStruct_F_Set(refnum, _v);
}
@end
@implementation TestpkgS {
}
- (id)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
- (void)f {
int32_t refnum = go_seq_go_to_refnum(self._ref);
proxytestpkg_S_F(refnum);
}
- (NSString*)string {
int32_t refnum = go_seq_go_to_refnum(self._ref);
nstring r0 = proxytestpkg_S_String(refnum);
NSString *_ret0_ = go_seq_to_objc_string(r0);
return _ret0_;
}
@end
@implementation TestpkgS2 {
}
- (id)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
- (double)x {
int32_t refnum = go_seq_go_to_refnum(self._ref);
double r0 = proxytestpkg_S2_X_Get(refnum);
double _r0 = (double)r0;
return _r0;
}
- (void)setX:(double)v {
int32_t refnum = go_seq_go_to_refnum(self._ref);
double _v = (double)v;
proxytestpkg_S2_X_Set(refnum, _v);
}
- (double)y {
int32_t refnum = go_seq_go_to_refnum(self._ref);
double r0 = proxytestpkg_S2_Y_Get(refnum);
double _r0 = (double)r0;
return _r0;
}
- (void)setY:(double)v {
int32_t refnum = go_seq_go_to_refnum(self._ref);
double _v = (double)v;
proxytestpkg_S2_Y_Set(refnum, _v);
}
- (double)sum {
int32_t refnum = go_seq_go_to_refnum(self._ref);
double r0 = proxytestpkg_S2_Sum(refnum);
double _ret0_ = (double)r0;
return _ret0_;
}
- (NSString*)tryTwoStrings:(NSString*)first second:(NSString*)second {
int32_t refnum = go_seq_go_to_refnum(self._ref);
nstring _first = go_seq_from_objc_string(first);
nstring _second = go_seq_from_objc_string(second);
nstring r0 = proxytestpkg_S2_TryTwoStrings(refnum, _first, _second);
NSString *_ret0_ = go_seq_to_objc_string(r0);
return _ret0_;
}
@end
@implementation TestpkgS3 {
}
- (id)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
@end
@implementation TestpkgS4 {
}
- (id)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
- (long)i {
int32_t refnum = go_seq_go_to_refnum(self._ref);
nint r0 = proxytestpkg_S4_I_Get(refnum);
long _r0 = (long)r0;
return _r0;
}
- (void)setI:(long)v {
int32_t refnum = go_seq_go_to_refnum(self._ref);
nint _v = (nint)v;
proxytestpkg_S4_I_Set(refnum, _v);
}
@end
@implementation TestpkgB {
}
- (instancetype)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
- (void)b:(NSData*)b {
int32_t refnum = go_seq_go_to_refnum(self._ref);
nbyteslice _b = go_seq_from_objc_bytearray(b, 0);
proxytestpkg_B_B(refnum, _b);
if (![b isKindOfClass:[NSMutableData class]]) {
free(_b.ptr);
}
}
@end
@implementation TestpkgConcreteDupper {
}
- (instancetype)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
- (TestpkgConcrete*)cDup:(TestpkgConcrete*)c {
int32_t refnum = go_seq_go_to_refnum(self._ref);
int32_t _c;
if ([c conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> c_proxy = (id<goSeqRefInterface>)(c);
_c = go_seq_go_to_refnum(c_proxy._ref);
} else {
_c = go_seq_to_refnum(c);
}
int32_t r0 = proxytestpkg_ConcreteDupper_CDup(refnum, _c);
TestpkgConcrete* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgConcrete alloc] initWithRef:_ret0__ref];
}
}
return _ret0_;
}
@end
@implementation TestpkgEmptyErrorer {
}
- (instancetype)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
- (BOOL)emptyError:(NSError**)error {
int32_t refnum = go_seq_go_to_refnum(self._ref);
int32_t r0 = proxytestpkg_EmptyErrorer_EmptyError(refnum);
Universeerror* _error = nil;
GoSeqRef* _error_ref = go_seq_from_refnum(r0);
if (_error_ref != NULL) {
_error = _error_ref.obj;
if (_error == nil) {
_error = [[Universeerror alloc] initWithRef:_error_ref];
}
}
if (_error != nil && error != nil) {
*error = _error;
}
return (_error == nil);
}
@end
@implementation TestpkgGoCallback {
}
- (instancetype)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
- (void)varUpdate {
int32_t refnum = go_seq_go_to_refnum(self._ref);
proxytestpkg_GoCallback_VarUpdate(refnum);
}
@end
@implementation TestpkgI {
}
- (instancetype)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
- (BOOL)e:(NSError**)error {
int32_t refnum = go_seq_go_to_refnum(self._ref);
int32_t r0 = proxytestpkg_I_E(refnum);
Universeerror* _error = nil;
GoSeqRef* _error_ref = go_seq_from_refnum(r0);
if (_error_ref != NULL) {
_error = _error_ref.obj;
if (_error == nil) {
_error = [[Universeerror alloc] initWithRef:_error_ref];
}
}
if (_error != nil && error != nil) {
*error = _error;
}
return (_error == nil);
}
- (void)f {
int32_t refnum = go_seq_go_to_refnum(self._ref);
proxytestpkg_I_F(refnum);
}
- (id<TestpkgI>)i {
int32_t refnum = go_seq_go_to_refnum(self._ref);
int32_t r0 = proxytestpkg_I_I(refnum);
TestpkgI* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgI alloc] initWithRef:_ret0__ref];
}
}
return _ret0_;
}
- (TestpkgS*)s {
int32_t refnum = go_seq_go_to_refnum(self._ref);
int32_t r0 = proxytestpkg_I_S(refnum);
TestpkgS* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgS alloc] initWithRef:_ret0__ref];
}
}
return _ret0_;
}
- (NSString*)stoString:(TestpkgS*)seq {
int32_t refnum = go_seq_go_to_refnum(self._ref);
int32_t _seq;
if ([seq conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> seq_proxy = (id<goSeqRefInterface>)(seq);
_seq = go_seq_go_to_refnum(seq_proxy._ref);
} else {
_seq = go_seq_to_refnum(seq);
}
nstring r0 = proxytestpkg_I_StoString(refnum, _seq);
NSString *_ret0_ = go_seq_to_objc_string(r0);
return _ret0_;
}
- (NSString*)string {
int32_t refnum = go_seq_go_to_refnum(self._ref);
nstring r0 = proxytestpkg_I_String(refnum);
NSString *_ret0_ = go_seq_to_objc_string(r0);
return _ret0_;
}
- (long)v {
int32_t refnum = go_seq_go_to_refnum(self._ref);
nint r0 = proxytestpkg_I_V(refnum);
long _ret0_ = (long)r0;
return _ret0_;
}
- (BOOL)ve:(long*)ret0_ error:(NSError**)error {
int32_t refnum = go_seq_go_to_refnum(self._ref);
struct proxytestpkg_I_VE_return res = proxytestpkg_I_VE(refnum);
long _ret0_ = (long)res.r0;
Universeerror* _error = nil;
GoSeqRef* _error_ref = go_seq_from_refnum(res.r1);
if (_error_ref != NULL) {
_error = _error_ref.obj;
if (_error == nil) {
_error = [[Universeerror alloc] initWithRef:_error_ref];
}
}
*ret0_ = _ret0_;
if (_error != nil && error != nil) {
*error = _error;
}
return (_error == nil);
}
@end
@implementation TestpkgI2 {
}
- (instancetype)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
- (BOOL)error:(BOOL)triggerError error:(NSError**)error {
int32_t refnum = go_seq_go_to_refnum(self._ref);
char _triggerError = (char)triggerError;
int32_t r0 = proxytestpkg_I2_Error(refnum, _triggerError);
Universeerror* _error = nil;
GoSeqRef* _error_ref = go_seq_from_refnum(r0);
if (_error_ref != NULL) {
_error = _error_ref.obj;
if (_error == nil) {
_error = [[Universeerror alloc] initWithRef:_error_ref];
}
}
if (_error != nil && error != nil) {
*error = _error;
}
return (_error == nil);
}
- (NSString*)stringError:(NSString*)s error:(NSError**)error {
int32_t refnum = go_seq_go_to_refnum(self._ref);
nstring _s = go_seq_from_objc_string(s);
struct proxytestpkg_I2_StringError_return res = proxytestpkg_I2_StringError(refnum, _s);
NSString *_ret0_ = go_seq_to_objc_string(res.r0);
Universeerror* _error = nil;
GoSeqRef* _error_ref = go_seq_from_refnum(res.r1);
if (_error_ref != NULL) {
_error = _error_ref.obj;
if (_error == nil) {
_error = [[Universeerror alloc] initWithRef:_error_ref];
}
}
if (_error != nil && error != nil) {
*error = _error;
}
if (_error != nil) {
return nil;
}
return _ret0_;
}
- (int64_t)times:(int32_t)v {
int32_t refnum = go_seq_go_to_refnum(self._ref);
int32_t _v = (int32_t)v;
int64_t r0 = proxytestpkg_I2_Times(refnum, _v);
int64_t _ret0_ = (int64_t)r0;
return _ret0_;
}
@end
@implementation TestpkgImportedI {
}
- (instancetype)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
- (void)f:(TODO)p0 {
int32_t refnum = go_seq_go_to_refnum(self._ref);
TODO _p0 = (TODO)p0;
proxytestpkg_ImportedI_F(refnum, _p0);
}
@end
@implementation TestpkgInterface {
}
- (instancetype)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
- (void)f {
int32_t refnum = go_seq_go_to_refnum(self._ref);
proxytestpkg_Interface_F(refnum);
}
@end
@implementation TestpkgInterfaceDupper {
}
- (instancetype)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
- (id<TestpkgInterface>)iDup:(id<TestpkgInterface>)i {
int32_t refnum = go_seq_go_to_refnum(self._ref);
int32_t _i;
if ([i conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> i_proxy = (id<goSeqRefInterface>)(i);
_i = go_seq_go_to_refnum(i_proxy._ref);
} else {
_i = go_seq_to_refnum(i);
}
int32_t r0 = proxytestpkg_InterfaceDupper_IDup(refnum, _i);
TestpkgInterface* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgInterface alloc] initWithRef:_ret0__ref];
}
}
return _ret0_;
}
@end
@implementation TestpkgIssue14168 {
}
- (instancetype)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
- (void)f:(int32_t)seq {
int32_t refnum = go_seq_go_to_refnum(self._ref);
int32_t _seq = (int32_t)seq;
proxytestpkg_Issue14168_F(refnum, _seq);
}
@end
@implementation TestpkgIssue17073 {
}
- (instancetype)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
- (void)onError:(NSError*)err {
int32_t refnum = go_seq_go_to_refnum(self._ref);
int32_t _err;
if ([err conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> err_proxy = (id<goSeqRefInterface>)(err);
_err = go_seq_go_to_refnum(err_proxy._ref);
} else {
_err = go_seq_to_refnum(err);
}
proxytestpkg_Issue17073_OnError(refnum, _err);
}
@end
@implementation TestpkgNullTest {
}
- (instancetype)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
- (id<TestpkgNullTest>)null {
int32_t refnum = go_seq_go_to_refnum(self._ref);
int32_t r0 = proxytestpkg_NullTest_Null(refnum);
TestpkgNullTest* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgNullTest alloc] initWithRef:_ret0__ref];
}
}
return _ret0_;
}
@end
@implementation TestpkgNummer {
}
- (instancetype)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
- (void)num {
int32_t refnum = go_seq_go_to_refnum(self._ref);
proxytestpkg_Nummer_Num(refnum);
}
@end
@implementation TestpkgReceiver {
}
- (instancetype)initWithRef:(id)ref {
self = [super init];
if (self) { __ref = ref; }
return self;
}
- (void)hello:(NSString*)message {
int32_t refnum = go_seq_go_to_refnum(self._ref);
nstring _message = go_seq_from_objc_string(message);
proxytestpkg_Receiver_Hello(refnum, _message);
}
@end
const BOOL TestpkgABool = YES;
const double TestpkgAFloat = 0.12345;
NSString* const TestpkgAString = @"a string";
const int64_t TestpkgAnInt = 7LL;
const double TestpkgLog2E = 1.4426950408889634;
const float TestpkgMaxFloat32 = 3.4028234663852886e+38;
const double TestpkgMaxFloat64 = 1.7976931348623157e+308;
const int32_t TestpkgMaxInt32 = 2147483647;
const int64_t TestpkgMaxInt64 = 9223372036854775807LL;
const int32_t TestpkgMinInt32 = -2147483648;
const int64_t TestpkgMinInt64 = -9223372036854775807LL-1;
const float TestpkgSmallestNonzeroFloat32 = 0;
const double TestpkgSmallestNonzeroFloat64 = 5e-324;
@implementation Testpkg
+ (void) setGlobalErr:(NSError*)v {
int32_t _v;
if ([v conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> v_proxy = (id<goSeqRefInterface>)(v);
_v = go_seq_go_to_refnum(v_proxy._ref);
} else {
_v = go_seq_to_refnum(v);
}
var_settestpkg_GlobalErr(_v);
}
+ (NSError*) globalErr {
int32_t r0 = var_gettestpkg_GlobalErr();
Universeerror* _r0 = nil;
GoSeqRef* _r0_ref = go_seq_from_refnum(r0);
if (_r0_ref != NULL) {
_r0 = _r0_ref.obj;
if (_r0 == nil) {
_r0 = [[Universeerror alloc] initWithRef:_r0_ref];
}
}
return _r0;
}
+ (void) setImportedVarI:(TODO)v {
TODO _v = (TODO)v;
var_settestpkg_ImportedVarI(_v);
}
+ (TODO) importedVarI {
TODO r0 = var_gettestpkg_ImportedVarI();
TODO _r0 = (TODO)r0;
return _r0;
}
// skipped variable ImportedVarS with unsupported type: *types.Pointer
+ (void) setIntVar:(long)v {
nint _v = (nint)v;
var_settestpkg_IntVar(_v);
}
+ (long) intVar {
nint r0 = var_gettestpkg_IntVar();
long _r0 = (long)r0;
return _r0;
}
+ (void) setInterfaceVar:(id<TestpkgI>)v {
int32_t _v;
if ([v conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> v_proxy = (id<goSeqRefInterface>)(v);
_v = go_seq_go_to_refnum(v_proxy._ref);
} else {
_v = go_seq_to_refnum(v);
}
var_settestpkg_InterfaceVar(_v);
}
+ (id<TestpkgI>) interfaceVar {
int32_t r0 = var_gettestpkg_InterfaceVar();
TestpkgI* _r0 = nil;
GoSeqRef* _r0_ref = go_seq_from_refnum(r0);
if (_r0_ref != NULL) {
_r0 = _r0_ref.obj;
if (_r0 == nil) {
_r0 = [[TestpkgI alloc] initWithRef:_r0_ref];
}
}
return _r0;
}
+ (void) setInterfaceVar2:(id<TestpkgI2>)v {
int32_t _v;
if ([v conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> v_proxy = (id<goSeqRefInterface>)(v);
_v = go_seq_go_to_refnum(v_proxy._ref);
} else {
_v = go_seq_to_refnum(v);
}
var_settestpkg_InterfaceVar2(_v);
}
+ (id<TestpkgI2>) interfaceVar2 {
int32_t r0 = var_gettestpkg_InterfaceVar2();
TestpkgI2* _r0 = nil;
GoSeqRef* _r0_ref = go_seq_from_refnum(r0);
if (_r0_ref != NULL) {
_r0 = _r0_ref.obj;
if (_r0 == nil) {
_r0 = [[TestpkgI2 alloc] initWithRef:_r0_ref];
}
}
return _r0;
}
+ (void) setNodeVar:(TestpkgNode*)v {
int32_t _v;
if ([v conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> v_proxy = (id<goSeqRefInterface>)(v);
_v = go_seq_go_to_refnum(v_proxy._ref);
} else {
_v = go_seq_to_refnum(v);
}
var_settestpkg_NodeVar(_v);
}
+ (TestpkgNode*) nodeVar {
int32_t r0 = var_gettestpkg_NodeVar();
TestpkgNode* _r0 = nil;
GoSeqRef* _r0_ref = go_seq_from_refnum(r0);
if (_r0_ref != NULL) {
_r0 = _r0_ref.obj;
if (_r0 == nil) {
_r0 = [[TestpkgNode alloc] initWithRef:_r0_ref];
}
}
return _r0;
}
+ (void) setStringVar:(NSString*)v {
nstring _v = go_seq_from_objc_string(v);
var_settestpkg_StringVar(_v);
}
+ (NSString*) stringVar {
nstring r0 = var_gettestpkg_StringVar();
NSString *_r0 = go_seq_to_objc_string(r0);
return _r0;
}
+ (void) setStructVar:(TestpkgS*)v {
int32_t _v;
if ([v conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> v_proxy = (id<goSeqRefInterface>)(v);
_v = go_seq_go_to_refnum(v_proxy._ref);
} else {
_v = go_seq_to_refnum(v);
}
var_settestpkg_StructVar(_v);
}
+ (TestpkgS*) structVar {
int32_t r0 = var_gettestpkg_StructVar();
TestpkgS* _r0 = nil;
GoSeqRef* _r0_ref = go_seq_from_refnum(r0);
if (_r0_ref != NULL) {
_r0 = _r0_ref.obj;
if (_r0 == nil) {
_r0 = [[TestpkgS alloc] initWithRef:_r0_ref];
}
}
return _r0;
}
@end
long TestpkgAdd(long x, long y) {
nint _x = (nint)x;
nint _y = (nint)y;
nint r0 = proxytestpkg__Add(_x, _y);
long _ret0_ = (long)r0;
return _ret0_;
}
NSString* TestpkgAppendHello(NSString* s) {
nstring _s = go_seq_from_objc_string(s);
nstring r0 = proxytestpkg__AppendHello(_s);
NSString *_ret0_ = go_seq_to_objc_string(r0);
return _ret0_;
}
NSData* TestpkgAppendToString(NSString* str, NSData* someBytes) {
nstring _str = go_seq_from_objc_string(str);
nbyteslice _someBytes = go_seq_from_objc_bytearray(someBytes, 0);
nbyteslice r0 = proxytestpkg__AppendToString(_str, _someBytes);
if (![someBytes isKindOfClass:[NSMutableData class]]) {
free(_someBytes.ptr);
}
NSData *_ret0_ = go_seq_to_objc_bytearray(r0, 1);
return _ret0_;
}
NSData* TestpkgBytesAppend(NSData* a, NSData* b) {
nbyteslice _a = go_seq_from_objc_bytearray(a, 0);
nbyteslice _b = go_seq_from_objc_bytearray(b, 0);
nbyteslice r0 = proxytestpkg__BytesAppend(_a, _b);
if (![a isKindOfClass:[NSMutableData class]]) {
free(_a.ptr);
}
if (![b isKindOfClass:[NSMutableData class]]) {
free(_b.ptr);
}
NSData *_ret0_ = go_seq_to_objc_bytearray(r0, 1);
return _ret0_;
}
BOOL TestpkgCallCDupper(id<TestpkgConcreteDupper> d) {
int32_t _d;
if ([d conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> d_proxy = (id<goSeqRefInterface>)(d);
_d = go_seq_go_to_refnum(d_proxy._ref);
} else {
_d = go_seq_to_refnum(d);
}
char r0 = proxytestpkg__CallCDupper(_d);
BOOL _ret0_ = r0 ? YES : NO;
return _ret0_;
}
BOOL TestpkgCallE(id<TestpkgI> i, NSError** error) {
int32_t _i;
if ([i conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> i_proxy = (id<goSeqRefInterface>)(i);
_i = go_seq_go_to_refnum(i_proxy._ref);
} else {
_i = go_seq_to_refnum(i);
}
int32_t r0 = proxytestpkg__CallE(_i);
Universeerror* _error = nil;
GoSeqRef* _error_ref = go_seq_from_refnum(r0);
if (_error_ref != NULL) {
_error = _error_ref.obj;
if (_error == nil) {
_error = [[Universeerror alloc] initWithRef:_error_ref];
}
}
if (_error != nil && error != nil) {
*error = _error;
}
return (_error == nil);
}
BOOL TestpkgCallEmptyError(id<TestpkgEmptyErrorer> c, NSError** error) {
int32_t _c;
if ([c conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> c_proxy = (id<goSeqRefInterface>)(c);
_c = go_seq_go_to_refnum(c_proxy._ref);
} else {
_c = go_seq_to_refnum(c);
}
int32_t r0 = proxytestpkg__CallEmptyError(_c);
Universeerror* _error = nil;
GoSeqRef* _error_ref = go_seq_from_refnum(r0);
if (_error_ref != NULL) {
_error = _error_ref.obj;
if (_error == nil) {
_error = [[Universeerror alloc] initWithRef:_error_ref];
}
}
if (_error != nil && error != nil) {
*error = _error;
}
return (_error == nil);
}
void TestpkgCallF(id<TestpkgI> i) {
int32_t _i;
if ([i conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> i_proxy = (id<goSeqRefInterface>)(i);
_i = go_seq_go_to_refnum(i_proxy._ref);
} else {
_i = go_seq_to_refnum(i);
}
proxytestpkg__CallF(_i);
}
id<TestpkgI> TestpkgCallI(id<TestpkgI> i) {
int32_t _i;
if ([i conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> i_proxy = (id<goSeqRefInterface>)(i);
_i = go_seq_go_to_refnum(i_proxy._ref);
} else {
_i = go_seq_to_refnum(i);
}
int32_t r0 = proxytestpkg__CallI(_i);
TestpkgI* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgI alloc] initWithRef:_ret0__ref];
}
}
return _ret0_;
}
BOOL TestpkgCallIDupper(id<TestpkgInterfaceDupper> d) {
int32_t _d;
if ([d conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> d_proxy = (id<goSeqRefInterface>)(d);
_d = go_seq_go_to_refnum(d_proxy._ref);
} else {
_d = go_seq_to_refnum(d);
}
char r0 = proxytestpkg__CallIDupper(_d);
BOOL _ret0_ = r0 ? YES : NO;
return _ret0_;
}
BOOL TestpkgCallIError(id<TestpkgI2> i, BOOL triggerError, NSError** error) {
int32_t _i;
if ([i conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> i_proxy = (id<goSeqRefInterface>)(i);
_i = go_seq_go_to_refnum(i_proxy._ref);
} else {
_i = go_seq_to_refnum(i);
}
char _triggerError = (char)triggerError;
int32_t r0 = proxytestpkg__CallIError(_i, _triggerError);
Universeerror* _error = nil;
GoSeqRef* _error_ref = go_seq_from_refnum(r0);
if (_error_ref != NULL) {
_error = _error_ref.obj;
if (_error == nil) {
_error = [[Universeerror alloc] initWithRef:_error_ref];
}
}
if (_error != nil && error != nil) {
*error = _error;
}
return (_error == nil);
}
NSString* TestpkgCallIStringError(id<TestpkgI2> i, NSString* s, NSError** error) {
int32_t _i;
if ([i conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> i_proxy = (id<goSeqRefInterface>)(i);
_i = go_seq_go_to_refnum(i_proxy._ref);
} else {
_i = go_seq_to_refnum(i);
}
nstring _s = go_seq_from_objc_string(s);
struct proxytestpkg__CallIStringError_return res = proxytestpkg__CallIStringError(_i, _s);
NSString *_ret0_ = go_seq_to_objc_string(res.r0);
Universeerror* _error = nil;
GoSeqRef* _error_ref = go_seq_from_refnum(res.r1);
if (_error_ref != NULL) {
_error = _error_ref.obj;
if (_error == nil) {
_error = [[Universeerror alloc] initWithRef:_error_ref];
}
}
if (_error != nil && error != nil) {
*error = _error;
}
if (_error != nil) {
return nil;
}
return _ret0_;
}
void TestpkgCallImportedI(TODO i) {
TODO _i = (TODO)i;
proxytestpkg__CallImportedI(_i);
}
TestpkgS* TestpkgCallS(id<TestpkgI> i) {
int32_t _i;
if ([i conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> i_proxy = (id<goSeqRefInterface>)(i);
_i = go_seq_go_to_refnum(i_proxy._ref);
} else {
_i = go_seq_to_refnum(i);
}
int32_t r0 = proxytestpkg__CallS(_i);
TestpkgS* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgS alloc] initWithRef:_ret0__ref];
}
}
return _ret0_;
}
double TestpkgCallSSum(TestpkgS2* s) {
int32_t _s;
if ([s conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> s_proxy = (id<goSeqRefInterface>)(s);
_s = go_seq_go_to_refnum(s_proxy._ref);
} else {
_s = go_seq_to_refnum(s);
}
double r0 = proxytestpkg__CallSSum(_s);
double _ret0_ = (double)r0;
return _ret0_;
}
long TestpkgCallV(id<TestpkgI> i) {
int32_t _i;
if ([i conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> i_proxy = (id<goSeqRefInterface>)(i);
_i = go_seq_go_to_refnum(i_proxy._ref);
} else {
_i = go_seq_to_refnum(i);
}
nint r0 = proxytestpkg__CallV(_i);
long _ret0_ = (long)r0;
return _ret0_;
}
BOOL TestpkgCallVE(id<TestpkgI> i, long* ret0_, NSError** error) {
int32_t _i;
if ([i conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> i_proxy = (id<goSeqRefInterface>)(i);
_i = go_seq_go_to_refnum(i_proxy._ref);
} else {
_i = go_seq_to_refnum(i);
}
struct proxytestpkg__CallVE_return res = proxytestpkg__CallVE(_i);
long _ret0_ = (long)res.r0;
Universeerror* _error = nil;
GoSeqRef* _error_ref = go_seq_from_refnum(res.r1);
if (_error_ref != NULL) {
_error = _error_ref.obj;
if (_error == nil) {
_error = [[Universeerror alloc] initWithRef:_error_ref];
}
}
*ret0_ = _ret0_;
if (_error != nil && error != nil) {
*error = _error;
}
return (_error == nil);
}
void TestpkgCallWithCallback(id<TestpkgGoCallback> gcb) {
int32_t _gcb;
if ([gcb conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> gcb_proxy = (id<goSeqRefInterface>)(gcb);
_gcb = go_seq_go_to_refnum(gcb_proxy._ref);
} else {
_gcb = go_seq_to_refnum(gcb);
}
proxytestpkg__CallWithCallback(_gcb);
}
BOOL TestpkgCallWithNull(id<TestpkgNullTest> p0, id<TestpkgNullTest> nuller) {
int32_t _p0;
if ([p0 conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> p0_proxy = (id<goSeqRefInterface>)(p0);
_p0 = go_seq_go_to_refnum(p0_proxy._ref);
} else {
_p0 = go_seq_to_refnum(p0);
}
int32_t _nuller;
if ([nuller conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> nuller_proxy = (id<goSeqRefInterface>)(nuller);
_nuller = go_seq_go_to_refnum(nuller_proxy._ref);
} else {
_nuller = go_seq_to_refnum(nuller);
}
char r0 = proxytestpkg__CallWithNull(_p0, _nuller);
BOOL _ret0_ = r0 ? YES : NO;
return _ret0_;
}
long TestpkgCollectS2(long want, long timeoutSec) {
nint _want = (nint)want;
nint _timeoutSec = (nint)timeoutSec;
nint r0 = proxytestpkg__CollectS2(_want, _timeoutSec);
long _ret0_ = (long)r0;
return _ret0_;
}
BOOL TestpkgEmptyError(NSError** error) {
int32_t r0 = proxytestpkg__EmptyError();
Universeerror* _error = nil;
GoSeqRef* _error_ref = go_seq_from_refnum(r0);
if (_error_ref != NULL) {
_error = _error_ref.obj;
if (_error == nil) {
_error = [[Universeerror alloc] initWithRef:_error_ref];
}
}
if (_error != nil && error != nil) {
*error = _error;
}
return (_error == nil);
}
BOOL TestpkgErr(NSString* s, NSError** error) {
nstring _s = go_seq_from_objc_string(s);
int32_t r0 = proxytestpkg__Err(_s);
Universeerror* _error = nil;
GoSeqRef* _error_ref = go_seq_from_refnum(r0);
if (_error_ref != NULL) {
_error = _error_ref.obj;
if (_error == nil) {
_error = [[Universeerror alloc] initWithRef:_error_ref];
}
}
if (_error != nil && error != nil) {
*error = _error;
}
return (_error == nil);
}
NSString* TestpkgErrorMessage(NSError* err) {
int32_t _err;
if ([err conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> err_proxy = (id<goSeqRefInterface>)(err);
_err = go_seq_go_to_refnum(err_proxy._ref);
} else {
_err = go_seq_to_refnum(err);
}
nstring r0 = proxytestpkg__ErrorMessage(_err);
NSString *_ret0_ = go_seq_to_objc_string(r0);
return _ret0_;
}
void TestpkgGC() {
proxytestpkg__GC();
}
void TestpkgGarbageCollect() {
proxytestpkg__GarbageCollect();
}
void TestpkgGoroutineCallback(id<TestpkgReceiver> r) {
int32_t _r;
if ([r conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> r_proxy = (id<goSeqRefInterface>)(r);
_r = go_seq_go_to_refnum(r_proxy._ref);
} else {
_r = go_seq_to_refnum(r);
}
proxytestpkg__GoroutineCallback(_r);
}
void TestpkgHello(id<TestpkgReceiver> r, NSString* name) {
int32_t _r;
if ([r conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> r_proxy = (id<goSeqRefInterface>)(r);
_r = go_seq_go_to_refnum(r_proxy._ref);
} else {
_r = go_seq_to_refnum(r);
}
nstring _name = go_seq_from_objc_string(name);
proxytestpkg__Hello(_r, _name);
}
void TestpkgHi() {
proxytestpkg__Hi();
}
id<TestpkgI2> TestpkgI2Dup(id<TestpkgI2> i) {
int32_t _i;
if ([i conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> i_proxy = (id<goSeqRefInterface>)(i);
_i = go_seq_go_to_refnum(i_proxy._ref);
} else {
_i = go_seq_to_refnum(i);
}
int32_t r0 = proxytestpkg__I2Dup(_i);
TestpkgI2* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgI2 alloc] initWithRef:_ret0__ref];
}
}
return _ret0_;
}
id<TestpkgI> TestpkgIDup(id<TestpkgI> i) {
int32_t _i;
if ([i conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> i_proxy = (id<goSeqRefInterface>)(i);
_i = go_seq_go_to_refnum(i_proxy._ref);
} else {
_i = go_seq_to_refnum(i);
}
int32_t r0 = proxytestpkg__IDup(_i);
TestpkgI* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgI alloc] initWithRef:_ret0__ref];
}
}
return _ret0_;
}
void TestpkgInit() {
proxytestpkg__Init();
}
void TestpkgInt(int32_t x) {
int32_t _x = (int32_t)x;
proxytestpkg__Int(_x);
}
BOOL TestpkgIsGlobalErr(NSError* err) {
int32_t _err;
if ([err conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> err_proxy = (id<goSeqRefInterface>)(err);
_err = go_seq_go_to_refnum(err_proxy._ref);
} else {
_err = go_seq_to_refnum(err);
}
char r0 = proxytestpkg__IsGlobalErr(_err);
BOOL _ret0_ = r0 ? YES : NO;
return _ret0_;
}
void TestpkgKeep(id<TestpkgI> i) {
int32_t _i;
if ([i conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> i_proxy = (id<goSeqRefInterface>)(i);
_i = go_seq_go_to_refnum(i_proxy._ref);
} else {
_i = go_seq_to_refnum(i);
}
proxytestpkg__Keep(_i);
}
int64_t TestpkgMultiply(int32_t idx, int32_t val) {
int32_t _idx = (int32_t)idx;
int32_t _val = (int32_t)val;
int64_t r0 = proxytestpkg__Multiply(_idx, _val);
int64_t _ret0_ = (int64_t)r0;
return _ret0_;
}
BOOL TestpkgNegate(BOOL x) {
char _x = (char)x;
char r0 = proxytestpkg__Negate(_x);
BOOL _ret0_ = r0 ? YES : NO;
return _ret0_;
}
TestpkgS* TestpkgNew() {
int32_t r0 = proxytestpkg__New();
TestpkgS* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgS alloc] initWithRef:_ret0__ref];
}
}
return _ret0_;
}
TestpkgConcrete* TestpkgNewConcrete() {
int32_t r0 = proxytestpkg__NewConcrete();
TestpkgConcrete* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgConcrete alloc] initWithRef:_ret0__ref];
}
}
return _ret0_;
}
id<TestpkgI2> TestpkgNewI() {
int32_t r0 = proxytestpkg__NewI();
TestpkgI2* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgI2 alloc] initWithRef:_ret0__ref];
}
}
return _ret0_;
}
TestpkgImportedFields* TestpkgNewImportedFields() {
int32_t r0 = proxytestpkg__NewImportedFields();
TestpkgImportedFields* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgImportedFields alloc] initWithRef:_ret0__ref];
}
}
return _ret0_;
}
TODO TestpkgNewImportedI() {
TODO r0 = proxytestpkg__NewImportedI();
TODO _ret0_ = (TODO)r0;
return _ret0_;
}
// skipped function NewImportedS with unsupported parameter or return types
TestpkgInitCaller* TestpkgNewInitCaller() {
int32_t r0 = proxytestpkg__NewInitCaller();
TestpkgInitCaller* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgInitCaller alloc] initWithRef:_ret0__ref];
}
}
return _ret0_;
}
TestpkgNode* TestpkgNewNode(NSString* name) {
nstring _name = go_seq_from_objc_string(name);
int32_t r0 = proxytestpkg__NewNode(_name);
TestpkgNode* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgNode alloc] initWithRef:_ret0__ref];
}
}
return _ret0_;
}
TestpkgNullFieldStruct* TestpkgNewNullFieldStruct() {
int32_t r0 = proxytestpkg__NewNullFieldStruct();
TestpkgNullFieldStruct* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgNullFieldStruct alloc] initWithRef:_ret0__ref];
}
}
return _ret0_;
}
id<TestpkgI> TestpkgNewNullInterface() {
int32_t r0 = proxytestpkg__NewNullInterface();
TestpkgI* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgI alloc] initWithRef:_ret0__ref];
}
}
return _ret0_;
}
TestpkgS* TestpkgNewNullStruct() {
int32_t r0 = proxytestpkg__NewNullStruct();
TestpkgS* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgS alloc] initWithRef:_ret0__ref];
}
}
return _ret0_;
}
TestpkgS2* TestpkgNewS2(double x, double y) {
double _x = (double)x;
double _y = (double)y;
int32_t r0 = proxytestpkg__NewS2(_x, _y);
TestpkgS2* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgS2 alloc] initWithRef:_ret0__ref];
}
}
return _ret0_;
}
TestpkgS4* TestpkgNewS4WithBoolAndError(BOOL b, NSError** error) {
char _b = (char)b;
struct proxytestpkg__NewS4WithBoolAndError_return res = proxytestpkg__NewS4WithBoolAndError(_b);
TestpkgS4* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(res.r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgS4 alloc] initWithRef:_ret0__ref];
}
}
Universeerror* _error = nil;
GoSeqRef* _error_ref = go_seq_from_refnum(res.r1);
if (_error_ref != NULL) {
_error = _error_ref.obj;
if (_error == nil) {
_error = [[Universeerror alloc] initWithRef:_error_ref];
}
}
if (_error != nil && error != nil) {
*error = _error;
}
if (_error != nil) {
return nil;
}
return _ret0_;
}
TestpkgS4* TestpkgNewS4WithFloat(double f) {
double _f = (double)f;
int32_t r0 = proxytestpkg__NewS4WithFloat(_f);
TestpkgS4* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgS4 alloc] initWithRef:_ret0__ref];
}
}
return _ret0_;
}
TestpkgS4* TestpkgNewS4WithInt(long i) {
nint _i = (nint)i;
int32_t r0 = proxytestpkg__NewS4WithInt(_i);
TestpkgS4* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgS4 alloc] initWithRef:_ret0__ref];
}
}
return _ret0_;
}
TestpkgAnSer* TestpkgNewSer() {
int32_t r0 = proxytestpkg__NewSer();
TestpkgAnSer* _ret0_ = nil;
GoSeqRef* _ret0__ref = go_seq_from_refnum(r0);
if (_ret0__ref != NULL) {
_ret0_ = _ret0__ref.obj;
if (_ret0_ == nil) {
_ret0_ = [[TestpkgAnSer alloc] initWithRef:_ret0__ref];
}
}
return _ret0_;
}
// skipped function NewSimpleS with unsupported parameter or return types
long TestpkgNumSCollected() {
nint r0 = proxytestpkg__NumSCollected();
long _ret0_ = (long)r0;
return _ret0_;
}
void TestpkgPassByteArray(id<TestpkgB> b) {
int32_t _b;
if ([b conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> b_proxy = (id<goSeqRefInterface>)(b);
_b = go_seq_go_to_refnum(b_proxy._ref);
} else {
_b = go_seq_to_refnum(b);
}
proxytestpkg__PassByteArray(_b);
}
NSString* TestpkgReadAsset() {
nstring r0 = proxytestpkg__ReadAsset();
NSString *_ret0_ = go_seq_to_objc_string(r0);
return _ret0_;
}
BOOL TestpkgReadIntoByteArray(NSData* s, long* ret0_, NSError** error) {
nbyteslice _s = go_seq_from_objc_bytearray(s, 0);
struct proxytestpkg__ReadIntoByteArray_return res = proxytestpkg__ReadIntoByteArray(_s);
if (![s isKindOfClass:[NSMutableData class]]) {
free(_s.ptr);
}
long _ret0_ = (long)res.r0;
Universeerror* _error = nil;
GoSeqRef* _error_ref = go_seq_from_refnum(res.r1);
if (_error_ref != NULL) {
_error = _error_ref.obj;
if (_error == nil) {
_error = [[Universeerror alloc] initWithRef:_error_ref];
}
}
*ret0_ = _ret0_;
if (_error != nil && error != nil) {
*error = _error;
}
return (_error == nil);
}
void TestpkgRegisterI(int32_t idx, id<TestpkgI2> i) {
int32_t _idx = (int32_t)idx;
int32_t _i;
if ([i conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> i_proxy = (id<goSeqRefInterface>)(i);
_i = go_seq_go_to_refnum(i_proxy._ref);
} else {
_i = go_seq_to_refnum(i);
}
proxytestpkg__RegisterI(_idx, _i);
}
NSString* TestpkgReturnsError(BOOL b, NSError** error) {
char _b = (char)b;
struct proxytestpkg__ReturnsError_return res = proxytestpkg__ReturnsError(_b);
NSString *_ret0_ = go_seq_to_objc_string(res.r0);
Universeerror* _error = nil;
GoSeqRef* _error_ref = go_seq_from_refnum(res.r1);
if (_error_ref != NULL) {
_error = _error_ref.obj;
if (_error == nil) {
_error = [[Universeerror alloc] initWithRef:_error_ref];
}
}
if (_error != nil && error != nil) {
*error = _error;
}
if (_error != nil) {
return nil;
}
return _ret0_;
}
NSString* TestpkgStrDup(NSString* s) {
nstring _s = go_seq_from_objc_string(s);
nstring r0 = proxytestpkg__StrDup(_s);
NSString *_ret0_ = go_seq_to_objc_string(r0);
return _ret0_;
}
void TestpkgTestSIGPIPE() {
proxytestpkg__TestSIGPIPE();
}
void TestpkgUnboundI(TODO p0) {
TODO _p0 = (TODO)p0;
proxytestpkg__UnboundI(_p0);
}
// skipped function UnboundS with unsupported parameter or return types
long TestpkgUnnamedParams(long p0, long p1, NSString* p2) {
nint _p0 = (nint)p0;
nint _p1 = (nint)p1;
nstring _p2 = go_seq_from_objc_string(p2);
nint r0 = proxytestpkg__UnnamedParams(_p0, _p1, _p2);
long _ret0_ = (long)r0;
return _ret0_;
}
void TestpkgUnregisterI(int32_t idx) {
int32_t _idx = (int32_t)idx;
proxytestpkg__UnregisterI(_idx);
}
TODO TestpkgWithImportedI(TODO i) {
TODO _i = (TODO)i;
TODO r0 = proxytestpkg__WithImportedI(_i);
TODO _ret0_ = (TODO)r0;
return _ret0_;
}
// skipped function WithImportedS with unsupported parameter or return types
void cproxytestpkg_B_B(int32_t refnum, nbyteslice b) {
@autoreleasepool {
TestpkgB* o = go_seq_objc_from_refnum(refnum);
NSData *_b = go_seq_to_objc_bytearray(b, 0);
[o b:_b];
}
}
int32_t cproxytestpkg_ConcreteDupper_CDup(int32_t refnum, int32_t c) {
@autoreleasepool {
TestpkgConcreteDupper* o = go_seq_objc_from_refnum(refnum);
TestpkgConcrete* _c = nil;
GoSeqRef* _c_ref = go_seq_from_refnum(c);
if (_c_ref != NULL) {
_c = _c_ref.obj;
if (_c == nil) {
_c = [[TestpkgConcrete alloc] initWithRef:_c_ref];
}
}
TestpkgConcrete* ret0_;
ret0_ = [o cDup:_c];
int32_t _ret0_;
if ([ret0_ conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> ret0__proxy = (id<goSeqRefInterface>)(ret0_);
_ret0_ = go_seq_go_to_refnum(ret0__proxy._ref);
} else {
_ret0_ = go_seq_to_refnum(ret0_);
}
return _ret0_;
}
}
int32_t cproxytestpkg_EmptyErrorer_EmptyError(int32_t refnum) {
@autoreleasepool {
TestpkgEmptyErrorer* o = go_seq_objc_from_refnum(refnum);
NSError* error = nil;
BOOL returnVal = [o emptyError:&error];
NSError *_error = nil;
if (!returnVal) {
_error = error;
}
int32_t __error;
if ([_error conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> _error_proxy = (id<goSeqRefInterface>)(_error);
__error = go_seq_go_to_refnum(_error_proxy._ref);
} else {
__error = go_seq_to_refnum(_error);
}
return __error;
}
}
void cproxytestpkg_GoCallback_VarUpdate(int32_t refnum) {
@autoreleasepool {
TestpkgGoCallback* o = go_seq_objc_from_refnum(refnum);
[o varUpdate];
}
}
int32_t cproxytestpkg_I_E(int32_t refnum) {
@autoreleasepool {
TestpkgI* o = go_seq_objc_from_refnum(refnum);
NSError* error = nil;
BOOL returnVal = [o e:&error];
NSError *_error = nil;
if (!returnVal) {
_error = error;
}
int32_t __error;
if ([_error conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> _error_proxy = (id<goSeqRefInterface>)(_error);
__error = go_seq_go_to_refnum(_error_proxy._ref);
} else {
__error = go_seq_to_refnum(_error);
}
return __error;
}
}
void cproxytestpkg_I_F(int32_t refnum) {
@autoreleasepool {
TestpkgI* o = go_seq_objc_from_refnum(refnum);
[o f];
}
}
int32_t cproxytestpkg_I_I(int32_t refnum) {
@autoreleasepool {
TestpkgI* o = go_seq_objc_from_refnum(refnum);
id<TestpkgI> ret0_;
ret0_ = [o i];
int32_t _ret0_;
if ([ret0_ conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> ret0__proxy = (id<goSeqRefInterface>)(ret0_);
_ret0_ = go_seq_go_to_refnum(ret0__proxy._ref);
} else {
_ret0_ = go_seq_to_refnum(ret0_);
}
return _ret0_;
}
}
int32_t cproxytestpkg_I_S(int32_t refnum) {
@autoreleasepool {
TestpkgI* o = go_seq_objc_from_refnum(refnum);
TestpkgS* ret0_;
ret0_ = [o s];
int32_t _ret0_;
if ([ret0_ conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> ret0__proxy = (id<goSeqRefInterface>)(ret0_);
_ret0_ = go_seq_go_to_refnum(ret0__proxy._ref);
} else {
_ret0_ = go_seq_to_refnum(ret0_);
}
return _ret0_;
}
}
nstring cproxytestpkg_I_StoString(int32_t refnum, int32_t seq) {
@autoreleasepool {
TestpkgI* o = go_seq_objc_from_refnum(refnum);
TestpkgS* _seq = nil;
GoSeqRef* _seq_ref = go_seq_from_refnum(seq);
if (_seq_ref != NULL) {
_seq = _seq_ref.obj;
if (_seq == nil) {
_seq = [[TestpkgS alloc] initWithRef:_seq_ref];
}
}
NSString* ret0_;
ret0_ = [o stoString:_seq];
nstring _ret0_ = go_seq_from_objc_string(ret0_);
return _ret0_;
}
}
nstring cproxytestpkg_I_String(int32_t refnum) {
@autoreleasepool {
TestpkgI* o = go_seq_objc_from_refnum(refnum);
NSString* ret0_;
ret0_ = [o string];
nstring _ret0_ = go_seq_from_objc_string(ret0_);
return _ret0_;
}
}
nint cproxytestpkg_I_V(int32_t refnum) {
@autoreleasepool {
TestpkgI* o = go_seq_objc_from_refnum(refnum);
long ret0_;
ret0_ = [o v];
nint _ret0_ = (nint)ret0_;
return _ret0_;
}
}
struct cproxytestpkg_I_VE_return cproxytestpkg_I_VE(int32_t refnum) {
@autoreleasepool {
TestpkgI* o = go_seq_objc_from_refnum(refnum);
long ret0_;
NSError* error = nil;
BOOL returnVal = [o ve:&ret0_ error:&error];
nint _ret0_ = (nint)ret0_;
NSError *_error = nil;
if (!returnVal) {
_error = error;
}
int32_t __error;
if ([_error conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> _error_proxy = (id<goSeqRefInterface>)(_error);
__error = go_seq_go_to_refnum(_error_proxy._ref);
} else {
__error = go_seq_to_refnum(_error);
}
cproxytestpkg_I_VE_return _sres = {
_ret0_, __error
};
return _sres;
}
}
int32_t cproxytestpkg_I2_Error(int32_t refnum, char triggerError) {
@autoreleasepool {
TestpkgI2* o = go_seq_objc_from_refnum(refnum);
BOOL _triggerError = triggerError ? YES : NO;
NSError* error = nil;
BOOL returnVal = [o error:_triggerError error:&error];
NSError *_error = nil;
if (!returnVal) {
_error = error;
}
int32_t __error;
if ([_error conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> _error_proxy = (id<goSeqRefInterface>)(_error);
__error = go_seq_go_to_refnum(_error_proxy._ref);
} else {
__error = go_seq_to_refnum(_error);
}
return __error;
}
}
struct cproxytestpkg_I2_StringError_return cproxytestpkg_I2_StringError(int32_t refnum, nstring s) {
@autoreleasepool {
TestpkgI2* o = go_seq_objc_from_refnum(refnum);
NSString *_s = go_seq_to_objc_string(s);
NSString* ret0_;
NSError* error = nil;
ret0_ = [o stringError:_s error:&error];
nstring _ret0_ = go_seq_from_objc_string(ret0_);
NSError *_error = nil;
if (error != nil) {
_error = error;
}
int32_t __error;
if ([_error conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> _error_proxy = (id<goSeqRefInterface>)(_error);
__error = go_seq_go_to_refnum(_error_proxy._ref);
} else {
__error = go_seq_to_refnum(_error);
}
cproxytestpkg_I2_StringError_return _sres = {
_ret0_, __error
};
return _sres;
}
}
int64_t cproxytestpkg_I2_Times(int32_t refnum, int32_t v) {
@autoreleasepool {
TestpkgI2* o = go_seq_objc_from_refnum(refnum);
int32_t _v = (int32_t)v;
int64_t ret0_;
ret0_ = [o times:_v];
int64_t _ret0_ = (int64_t)ret0_;
return _ret0_;
}
}
void cproxytestpkg_ImportedI_F(int32_t refnum, TODO p0) {
@autoreleasepool {
TestpkgImportedI* o = go_seq_objc_from_refnum(refnum);
TODO _p0 = (TODO)p0;
[o f:_p0];
}
}
void cproxytestpkg_Interface_F(int32_t refnum) {
@autoreleasepool {
TestpkgInterface* o = go_seq_objc_from_refnum(refnum);
[o f];
}
}
int32_t cproxytestpkg_InterfaceDupper_IDup(int32_t refnum, int32_t i) {
@autoreleasepool {
TestpkgInterfaceDupper* o = go_seq_objc_from_refnum(refnum);
TestpkgInterface* _i = nil;
GoSeqRef* _i_ref = go_seq_from_refnum(i);
if (_i_ref != NULL) {
_i = _i_ref.obj;
if (_i == nil) {
_i = [[TestpkgInterface alloc] initWithRef:_i_ref];
}
}
id<TestpkgInterface> ret0_;
ret0_ = [o iDup:_i];
int32_t _ret0_;
if ([ret0_ conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> ret0__proxy = (id<goSeqRefInterface>)(ret0_);
_ret0_ = go_seq_go_to_refnum(ret0__proxy._ref);
} else {
_ret0_ = go_seq_to_refnum(ret0_);
}
return _ret0_;
}
}
void cproxytestpkg_Issue14168_F(int32_t refnum, int32_t seq) {
@autoreleasepool {
TestpkgIssue14168* o = go_seq_objc_from_refnum(refnum);
int32_t _seq = (int32_t)seq;
[o f:_seq];
}
}
void cproxytestpkg_Issue17073_OnError(int32_t refnum, int32_t err) {
@autoreleasepool {
TestpkgIssue17073* o = go_seq_objc_from_refnum(refnum);
Universeerror* _err = nil;
GoSeqRef* _err_ref = go_seq_from_refnum(err);
if (_err_ref != NULL) {
_err = _err_ref.obj;
if (_err == nil) {
_err = [[Universeerror alloc] initWithRef:_err_ref];
}
}
[o onError:_err];
}
}
int32_t cproxytestpkg_NullTest_Null(int32_t refnum) {
@autoreleasepool {
TestpkgNullTest* o = go_seq_objc_from_refnum(refnum);
id<TestpkgNullTest> ret0_;
ret0_ = [o null];
int32_t _ret0_;
if ([ret0_ conformsToProtocol:@protocol(goSeqRefInterface)]) {
id<goSeqRefInterface> ret0__proxy = (id<goSeqRefInterface>)(ret0_);
_ret0_ = go_seq_go_to_refnum(ret0__proxy._ref);
} else {
_ret0_ = go_seq_to_refnum(ret0_);
}
return _ret0_;
}
}
void cproxytestpkg_Nummer_Num(int32_t refnum) {
@autoreleasepool {
TestpkgNummer* o = go_seq_objc_from_refnum(refnum);
[o num];
}
}
void cproxytestpkg_Receiver_Hello(int32_t refnum, nstring message) {
@autoreleasepool {
TestpkgReceiver* o = go_seq_objc_from_refnum(refnum);
NSString *_message = go_seq_to_objc_string(message);
[o hello:_message];
}
}
__attribute__((constructor)) static void init() {
init_seq();
}
// Objective-C API for talking to Go package.
// gobind -lang=objc
//
// File is generated by gobind. Do not edit.
#ifndef ___H__
#define ___H__
#include <stdint.h>
#include <objc/objc.h>
nstring cproxy_error_Error(int32_t refnum);
#endif
// Objective-C API for talking to Go package.
// gobind -lang=objc
//
// File is generated by gobind. Do not edit.
#ifndef __Universe_H__
#define __Universe_H__
@import Foundation;
@protocol Universeerror;
@class Universeerror;
@protocol Universeerror <NSObject>
- (NSString*)error;
@end
@class Universeerror;
@interface Universeerror : NSError <goSeqRefInterface, Universeerror> {
}
@property(strong, readonly) id _ref;
- (instancetype)initWithRef:(id)ref;
- (NSString*)error;
@end
#endif
// Objective-C API for talking to Go package.
// gobind -lang=objc
//
// File is generated by gobind. Do not edit.
#include <Foundation/Foundation.h>
#include "seq.h"
#include "_cgo_export.h"
#include "Universe.objc.h"
@implementation Universeerror {
}
- (instancetype)initWithRef:(id)ref {
if (self) {
__ref = ref;
self = [super initWithDomain:@"go" code:1 userInfo:@{NSLocalizedDescriptionKey: [self error]}];
}
return self;
}
- (NSString*)error {
int32_t refnum = go_seq_go_to_refnum(self._ref);
nstring r0 = proxy_error_Error(refnum);
NSString *_ret0_ = go_seq_to_objc_string(r0);
return _ret0_;
}
@end
nstring cproxy_error_Error(int32_t refnum) {
@autoreleasepool {
Universeerror* o = go_seq_objc_from_refnum(refnum);
NSString* ret0_;
ret0_ = [o localizedDescription];
nstring _ret0_ = go_seq_from_objc_string(ret0_);
return _ret0_;
}
}
__attribute__((constructor)) static void init() {
init_seq();
}
--- FAIL: TestGobind/Java-Testpkg (0.05s)
gobind_test.go:52: gobind -lang java golang.org/x/mobile/bind/testpkg failed: exit status 1: unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.Testpkg is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public abstract class Testpkg {
static {
Seq.touch(); // for loading the native library
_init();
}
private Testpkg() {} // uninstantiable
// touch is called from other bound packages to initialize this package
public static void touch() {}
private static native void _init();
private static final class proxyB implements Seq.Proxy, B {
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
proxyB(Seq.Ref ref) { this.ref = ref; }
public native void b(byte[] b);
}
private static final class proxyConcreteDupper implements Seq.Proxy, ConcreteDupper {
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
proxyConcreteDupper(Seq.Ref ref) { this.ref = ref; }
public native Concrete cDup(Concrete c);
}
private static final class proxyEmptyErrorer implements Seq.Proxy, EmptyErrorer {
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
proxyEmptyErrorer(Seq.Ref ref) { this.ref = ref; }
public native void emptyError() throws Exception;
}
private static final class proxyGoCallback implements Seq.Proxy, GoCallback {
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
proxyGoCallback(Seq.Ref ref) { this.ref = ref; }
public native void varUpdate();
}
private static final class proxyI implements Seq.Proxy, I {
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
proxyI(Seq.Ref ref) { this.ref = ref; }
public native void e() throws Exception;
public native void f();
public native I i();
public native S s();
public native String stoString(S seq);
public native String string();
public native long v();
public native long ve() throws Exception;
}
private static final class proxyI2 implements Seq.Proxy, I2 {
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
proxyI2(Seq.Ref ref) { this.ref = ref; }
public native void error(boolean triggerError) throws Exception;
public native String stringError(String s) throws Exception;
public native long times(int v);
}
private static final class proxyImportedI implements Seq.Proxy, ImportedI {
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
proxyImportedI(Seq.Ref ref) { this.ref = ref; }
public native void f(TODO p0);
}
private static final class proxyInterface implements Seq.Proxy, Interface {
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
proxyInterface(Seq.Ref ref) { this.ref = ref; }
public native void f();
}
private static final class proxyInterfaceDupper implements Seq.Proxy, InterfaceDupper {
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
proxyInterfaceDupper(Seq.Ref ref) { this.ref = ref; }
public native Interface iDup(Interface i);
}
private static final class proxyIssue14168 implements Seq.Proxy, Issue14168 {
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
proxyIssue14168(Seq.Ref ref) { this.ref = ref; }
public native void f(int seq);
}
private static final class proxyIssue17073 implements Seq.Proxy, Issue17073 {
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
proxyIssue17073(Seq.Ref ref) { this.ref = ref; }
public native void onError(java.lang.Exception err);
}
private static final class proxyNullTest implements Seq.Proxy, NullTest {
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
proxyNullTest(Seq.Ref ref) { this.ref = ref; }
public native NullTest null_();
}
private static final class proxyNummer implements Seq.Proxy, Nummer {
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
proxyNummer(Seq.Ref ref) { this.ref = ref; }
public native void num();
}
private static final class proxyReceiver implements Seq.Proxy, Receiver {
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
proxyReceiver(Seq.Ref ref) { this.ref = ref; }
public native void hello(String message);
}
public static final boolean ABool = true;
public static final double AFloat = 0.12345;
public static final String AString = "a string";
public static final long AnInt = 7L;
public static final double Log2E = 1.4426950408889634;
public static final float MaxFloat32 = 3.4028235e+38f;
public static final double MaxFloat64 = 1.7976931348623157e+308;
public static final int MaxInt32 = 2147483647;
public static final long MaxInt64 = 9223372036854775807L;
public static final int MinInt32 = -2147483648;
public static final long MinInt64 = -9223372036854775808L;
public static final float SmallestNonzeroFloat32 = 0f;
public static final double SmallestNonzeroFloat64 = 5e-324;
public static native void setGlobalErr(java.lang.Exception v);
public static native java.lang.Exception getGlobalErr();
public static native void setImportedVarI(TODO v);
public static native TODO getImportedVarI();
// skipped variable ImportedVarS with unsupported type: *types.Pointer
public static native void setIntVar(long v);
public static native long getIntVar();
public static native void setInterfaceVar(I v);
public static native I getInterfaceVar();
public static native void setInterfaceVar2(I2 v);
public static native I2 getInterfaceVar2();
public static native void setNodeVar(Node v);
public static native Node getNodeVar();
public static native void setStringVar(String v);
public static native String getStringVar();
public static native void setStructVar(S v);
public static native S getStructVar();
public static native long add(long x, long y);
public static native String appendHello(String s);
public static native byte[] appendToString(String str, byte[] someBytes);
public static native byte[] bytesAppend(byte[] a, byte[] b);
public static native boolean callCDupper(ConcreteDupper d);
public static native void callE(I i) throws Exception;
public static native void callEmptyError(EmptyErrorer c) throws Exception;
public static native void callF(I i);
public static native I callI(I i);
public static native boolean callIDupper(InterfaceDupper d);
public static native void callIError(I2 i, boolean triggerError) throws Exception;
public static native String callIStringError(I2 i, String s) throws Exception;
public static native void callImportedI(TODO i);
public static native S callS(I i);
public static native double callSSum(S2 s);
public static native long callV(I i);
public static native long callVE(I i) throws Exception;
public static native void callWithCallback(GoCallback gcb);
public static native boolean callWithNull(NullTest p0, NullTest nuller);
public static native long collectS2(long want, long timeoutSec);
public static native void emptyError() throws Exception;
public static native void err(String s) throws Exception;
public static native String errorMessage(java.lang.Exception err);
public static native void gc();
public static native void garbageCollect();
public static native void goroutineCallback(Receiver r);
public static native void hello(Receiver r, String name);
public static native void hi();
public static native I2 i2Dup(I2 i);
public static native I iDup(I i);
public static native void init();
public static native void int_(int x);
public static native boolean isGlobalErr(java.lang.Exception err);
public static native void keep(I i);
public static native long multiply(int idx, int val);
public static native boolean negate(boolean x);
public static native S new_();
public static native Concrete newConcrete();
public static native I2 newI();
public static native ImportedFields newImportedFields();
public static native TODO newImportedI();
// skipped function NewImportedS with unsupported parameter or return types
public static native InitCaller newInitCaller();
public static native Node newNode(String name);
public static native NullFieldStruct newNullFieldStruct();
public static native I newNullInterface();
public static native S newNullStruct();
public static native S2 newS2(double x, double y);
public static native S4 newS4WithBoolAndError(boolean b) throws Exception;
public static native S4 newS4WithFloat(double f);
public static native S4 newS4WithInt(long i);
public static native AnSer newSer();
// skipped function NewSimpleS with unsupported parameter or return types
public static native long numSCollected();
public static native void passByteArray(B b);
public static native String readAsset();
public static native long readIntoByteArray(byte[] s) throws Exception;
public static native void registerI(int idx, I2 i);
public static native String returnsError(boolean b) throws Exception;
public static native String strDup(String s);
public static native void testSIGPIPE();
public static native void unboundI(TODO p0);
// skipped function UnboundS with unsupported parameter or return types
public static native long unnamedParams(long p0, long p1, String p2);
public static native void unregisterI(int idx);
public static native TODO withImportedI(TODO i);
// skipped function WithImportedS with unsupported parameter or return types
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.AnSer is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public final class AnSer implements Seq.Proxy {
static { Testpkg.touch(); }
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
AnSer(Seq.Ref ref) { this.ref = ref; }
public AnSer() { this.ref = __New(); }
private static native Seq.Ref __New();
// skipped method AnSer.S with unsupported parameter or return types
@Override public boolean equals(Object o) {
if (o == null || !(o instanceof AnSer)) {
return false;
}
AnSer that = (AnSer)o;
return true;
}
@Override public int hashCode() {
return java.util.Arrays.hashCode(new Object[] {});
}
@Override public String toString() {
StringBuilder b = new StringBuilder();
b.append("AnSer").append("{");
return b.append("}").toString();
}
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.Concrete is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public final class Concrete implements Seq.Proxy, Interface {
static { Testpkg.touch(); }
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
public Concrete() {
this.ref = __NewConcrete();
}
private static native Seq.Ref __NewConcrete();
Concrete(Seq.Ref ref) { this.ref = ref; }
public native void f();
@Override public boolean equals(Object o) {
if (o == null || !(o instanceof Concrete)) {
return false;
}
Concrete that = (Concrete)o;
return true;
}
@Override public int hashCode() {
return java.util.Arrays.hashCode(new Object[] {});
}
@Override public String toString() {
StringBuilder b = new StringBuilder();
b.append("Concrete").append("{");
return b.append("}").toString();
}
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.ImportedFields is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public final class ImportedFields implements Seq.Proxy {
static { Testpkg.touch(); }
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
public ImportedFields() {
this.ref = __NewImportedFields();
}
private static native Seq.Ref __NewImportedFields();
ImportedFields(Seq.Ref ref) { this.ref = ref; }
public final native TODO getI();
public final native void setI(TODO v);
// skipped field ImportedFields.S with unsupported type: *types.Pointer
@Override public boolean equals(Object o) {
if (o == null || !(o instanceof ImportedFields)) {
return false;
}
ImportedFields that = (ImportedFields)o;
TODO thisI = getI();
TODO thatI = that.getI();
if (thisI == null) {
if (thatI != null) {
return false;
}
} else if (!thisI.equals(thatI)) {
return false;
}
// skipped field ImportedFields.S with unsupported type: *types.Pointer
return true;
}
@Override public int hashCode() {
return java.util.Arrays.hashCode(new Object[] {getI()});
}
@Override public String toString() {
StringBuilder b = new StringBuilder();
b.append("ImportedFields").append("{");
b.append("I:").append(getI()).append(",");
return b.append("}").toString();
}
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.InitCaller is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public final class InitCaller implements Seq.Proxy {
static { Testpkg.touch(); }
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
public InitCaller() {
this.ref = __NewInitCaller();
}
private static native Seq.Ref __NewInitCaller();
InitCaller(Seq.Ref ref) { this.ref = ref; }
public native void init();
@Override public boolean equals(Object o) {
if (o == null || !(o instanceof InitCaller)) {
return false;
}
InitCaller that = (InitCaller)o;
return true;
}
@Override public int hashCode() {
return java.util.Arrays.hashCode(new Object[] {});
}
@Override public String toString() {
StringBuilder b = new StringBuilder();
b.append("InitCaller").append("{");
return b.append("}").toString();
}
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.Node is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public final class Node implements Seq.Proxy {
static { Testpkg.touch(); }
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
public Node(String name) {
this.ref = __NewNode(name);
}
private static native Seq.Ref __NewNode(String name);
Node(Seq.Ref ref) { this.ref = ref; }
public final native String getV();
public final native void setV(String v);
public final native Node getNext();
public final native void setNext(Node v);
public final native java.lang.Exception getErr();
public final native void setErr(java.lang.Exception v);
public native String string();
@Override public boolean equals(Object o) {
if (o == null || !(o instanceof Node)) {
return false;
}
Node that = (Node)o;
String thisV = getV();
String thatV = that.getV();
if (thisV == null) {
if (thatV != null) {
return false;
}
} else if (!thisV.equals(thatV)) {
return false;
}
Node thisNext = getNext();
Node thatNext = that.getNext();
if (thisNext == null) {
if (thatNext != null) {
return false;
}
} else if (!thisNext.equals(thatNext)) {
return false;
}
java.lang.Exception thisErr = getErr();
java.lang.Exception thatErr = that.getErr();
if (thisErr == null) {
if (thatErr != null) {
return false;
}
} else if (!thisErr.equals(thatErr)) {
return false;
}
return true;
}
@Override public int hashCode() {
return java.util.Arrays.hashCode(new Object[] {getV(), getNext(), getErr()});
}
@Override public String toString() {
return string();
}
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.NullFieldStruct is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public final class NullFieldStruct implements Seq.Proxy {
static { Testpkg.touch(); }
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
public NullFieldStruct() {
this.ref = __NewNullFieldStruct();
}
private static native Seq.Ref __NewNullFieldStruct();
NullFieldStruct(Seq.Ref ref) { this.ref = ref; }
public final native S getF();
public final native void setF(S v);
@Override public boolean equals(Object o) {
if (o == null || !(o instanceof NullFieldStruct)) {
return false;
}
NullFieldStruct that = (NullFieldStruct)o;
S thisF = getF();
S thatF = that.getF();
if (thisF == null) {
if (thatF != null) {
return false;
}
} else if (!thisF.equals(thatF)) {
return false;
}
return true;
}
@Override public int hashCode() {
return java.util.Arrays.hashCode(new Object[] {getF()});
}
@Override public String toString() {
StringBuilder b = new StringBuilder();
b.append("NullFieldStruct").append("{");
b.append("F:").append(getF()).append(",");
return b.append("}").toString();
}
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.S is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public final class S implements Seq.Proxy, Interface {
static { Testpkg.touch(); }
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
S(Seq.Ref ref) { this.ref = ref; }
public S() { this.ref = __New(); }
private static native Seq.Ref __New();
public native void f();
public native String string();
@Override public boolean equals(Object o) {
if (o == null || !(o instanceof S)) {
return false;
}
S that = (S)o;
return true;
}
@Override public int hashCode() {
return java.util.Arrays.hashCode(new Object[] {});
}
@Override public String toString() {
return string();
}
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.S2 is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public final class S2 implements Seq.Proxy {
static { Testpkg.touch(); }
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
public S2(double x, double y) {
this.ref = __NewS2(x, y);
}
private static native Seq.Ref __NewS2(double x, double y);
S2(Seq.Ref ref) { this.ref = ref; }
public final native double getX();
public final native void setX(double v);
public final native double getY();
public final native void setY(double v);
public native double sum();
public native String tryTwoStrings(String first, String second);
@Override public boolean equals(Object o) {
if (o == null || !(o instanceof S2)) {
return false;
}
S2 that = (S2)o;
double thisX = getX();
double thatX = that.getX();
if (thisX != thatX) {
return false;
}
double thisY = getY();
double thatY = that.getY();
if (thisY != thatY) {
return false;
}
return true;
}
@Override public int hashCode() {
return java.util.Arrays.hashCode(new Object[] {getX(), getY()});
}
@Override public String toString() {
StringBuilder b = new StringBuilder();
b.append("S2").append("{");
b.append("X:").append(getX()).append(",");
b.append("Y:").append(getY()).append(",");
return b.append("}").toString();
}
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.S3 is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public final class S3 implements Seq.Proxy {
static { Testpkg.touch(); }
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
S3(Seq.Ref ref) { this.ref = ref; }
public S3() { this.ref = __New(); }
private static native Seq.Ref __New();
@Override public boolean equals(Object o) {
if (o == null || !(o instanceof S3)) {
return false;
}
S3 that = (S3)o;
return true;
}
@Override public int hashCode() {
return java.util.Arrays.hashCode(new Object[] {});
}
@Override public String toString() {
StringBuilder b = new StringBuilder();
b.append("S3").append("{");
return b.append("}").toString();
}
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.S4 is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public final class S4 implements Seq.Proxy {
static { Testpkg.touch(); }
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
public S4(boolean b) {
this.ref = __NewS4WithBoolAndError(b);
}
private static native Seq.Ref __NewS4WithBoolAndError(boolean b);
public S4(double f) {
this.ref = __NewS4WithFloat(f);
}
private static native Seq.Ref __NewS4WithFloat(double f);
public S4(long i) {
this.ref = __NewS4WithInt(i);
}
private static native Seq.Ref __NewS4WithInt(long i);
S4(Seq.Ref ref) { this.ref = ref; }
public final native long getI();
public final native void setI(long v);
@Override public boolean equals(Object o) {
if (o == null || !(o instanceof S4)) {
return false;
}
S4 that = (S4)o;
long thisI = getI();
long thatI = that.getI();
if (thisI != thatI) {
return false;
}
return true;
}
@Override public int hashCode() {
return java.util.Arrays.hashCode(new Object[] {getI()});
}
@Override public String toString() {
StringBuilder b = new StringBuilder();
b.append("S4").append("{");
b.append("I:").append(getI()).append(",");
return b.append("}").toString();
}
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.B is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public interface B {
public void b(byte[] b);
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.ConcreteDupper is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public interface ConcreteDupper {
public Concrete cDup(Concrete c);
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.EmptyErrorer is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public interface EmptyErrorer {
public void emptyError() throws Exception;
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.GoCallback is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public interface GoCallback {
public void varUpdate();
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.I is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public interface I extends Interface {
public void e() throws Exception;
public void f();
public I i();
public S s();
public String stoString(S seq);
public String string();
public long v();
public long ve() throws Exception;
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.I2 is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public interface I2 {
public void error(boolean triggerError) throws Exception;
public String stringError(String s) throws Exception;
public long times(int v);
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.ImportedI is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public interface ImportedI {
public void f(TODO p0);
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.Interface is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public interface Interface {
public void f();
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.InterfaceDupper is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public interface InterfaceDupper {
public Interface iDup(Interface i);
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.Issue14168 is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public interface Issue14168 {
public void f(int seq);
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.Issue17073 is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public interface Issue17073 {
public void onError(java.lang.Exception err);
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.NullTest is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public interface NullTest {
public NullTest null_();
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.Nummer is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public interface Nummer {
public void num();
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Java class testpkg.Receiver is a proxy for talking to a Go program.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
package testpkg;
import go.Seq;
public interface Receiver {
public void hello(String message);
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// JNI functions for the Go <=> Java bridge.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
#include <android/log.h>
#include <stdint.h>
#include "seq.h"
#include "_cgo_export.h"
#include "testpkg.h"
jclass proxy_class_testpkg_B;
jmethodID proxy_class_testpkg_B_cons;
static jmethodID mid_B_B;
jclass proxy_class_testpkg_ConcreteDupper;
jmethodID proxy_class_testpkg_ConcreteDupper_cons;
static jmethodID mid_ConcreteDupper_CDup;
jclass proxy_class_testpkg_EmptyErrorer;
jmethodID proxy_class_testpkg_EmptyErrorer_cons;
static jmethodID mid_EmptyErrorer_EmptyError;
jclass proxy_class_testpkg_GoCallback;
jmethodID proxy_class_testpkg_GoCallback_cons;
static jmethodID mid_GoCallback_VarUpdate;
jclass proxy_class_testpkg_I;
jmethodID proxy_class_testpkg_I_cons;
static jmethodID mid_I_E;
static jmethodID mid_I_F;
static jmethodID mid_I_I;
static jmethodID mid_I_S;
static jmethodID mid_I_StoString;
static jmethodID mid_I_String;
static jmethodID mid_I_V;
static jmethodID mid_I_VE;
jclass proxy_class_testpkg_I2;
jmethodID proxy_class_testpkg_I2_cons;
static jmethodID mid_I2_Error;
static jmethodID mid_I2_StringError;
static jmethodID mid_I2_Times;
jclass proxy_class_testpkg_ImportedI;
jmethodID proxy_class_testpkg_ImportedI_cons;
static jmethodID mid_ImportedI_F;
jclass proxy_class_testpkg_Interface;
jmethodID proxy_class_testpkg_Interface_cons;
static jmethodID mid_Interface_F;
jclass proxy_class_testpkg_InterfaceDupper;
jmethodID proxy_class_testpkg_InterfaceDupper_cons;
static jmethodID mid_InterfaceDupper_IDup;
jclass proxy_class_testpkg_Issue14168;
jmethodID proxy_class_testpkg_Issue14168_cons;
static jmethodID mid_Issue14168_F;
jclass proxy_class_testpkg_Issue17073;
jmethodID proxy_class_testpkg_Issue17073_cons;
static jmethodID mid_Issue17073_OnError;
jclass proxy_class_testpkg_NullTest;
jmethodID proxy_class_testpkg_NullTest_cons;
static jmethodID mid_NullTest_Null;
jclass proxy_class_testpkg_Nummer;
jmethodID proxy_class_testpkg_Nummer_cons;
static jmethodID mid_Nummer_Num;
jclass proxy_class_testpkg_Receiver;
jmethodID proxy_class_testpkg_Receiver_cons;
static jmethodID mid_Receiver_Hello;
jclass proxy_class_testpkg_AnSer;
jmethodID proxy_class_testpkg_AnSer_cons;
jclass proxy_class_testpkg_Concrete;
jmethodID proxy_class_testpkg_Concrete_cons;
jclass proxy_class_testpkg_ImportedFields;
jmethodID proxy_class_testpkg_ImportedFields_cons;
jclass proxy_class_testpkg_InitCaller;
jmethodID proxy_class_testpkg_InitCaller_cons;
jclass proxy_class_testpkg_Node;
jmethodID proxy_class_testpkg_Node_cons;
jclass proxy_class_testpkg_NullFieldStruct;
jmethodID proxy_class_testpkg_NullFieldStruct_cons;
jclass proxy_class_testpkg_S;
jmethodID proxy_class_testpkg_S_cons;
jclass proxy_class_testpkg_S2;
jmethodID proxy_class_testpkg_S2_cons;
jclass proxy_class_testpkg_S3;
jmethodID proxy_class_testpkg_S3_cons;
jclass proxy_class_testpkg_S4;
jmethodID proxy_class_testpkg_S4_cons;
JNIEXPORT void JNICALL
Java_testpkg_Testpkg__1init(JNIEnv *env, jclass _unused) {
jclass clazz;
clazz = (*env)->FindClass(env, "testpkg/AnSer");
proxy_class_testpkg_AnSer = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_AnSer_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/Concrete");
proxy_class_testpkg_Concrete = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_Concrete_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/ImportedFields");
proxy_class_testpkg_ImportedFields = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_ImportedFields_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/InitCaller");
proxy_class_testpkg_InitCaller = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_InitCaller_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/Node");
proxy_class_testpkg_Node = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_Node_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/NullFieldStruct");
proxy_class_testpkg_NullFieldStruct = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_NullFieldStruct_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/S");
proxy_class_testpkg_S = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_S_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/S2");
proxy_class_testpkg_S2 = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_S2_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/S3");
proxy_class_testpkg_S3 = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_S3_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/S4");
proxy_class_testpkg_S4 = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_S4_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/Testpkg$proxyB");
proxy_class_testpkg_B = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_B_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/B");
mid_B_B = (*env)->GetMethodID(env, clazz, "b", "([B)V");
clazz = (*env)->FindClass(env, "testpkg/Testpkg$proxyConcreteDupper");
proxy_class_testpkg_ConcreteDupper = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_ConcreteDupper_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/ConcreteDupper");
mid_ConcreteDupper_CDup = (*env)->GetMethodID(env, clazz, "cDup", "(Ltestpkg/Concrete;)Ltestpkg/Concrete;");
clazz = (*env)->FindClass(env, "testpkg/Testpkg$proxyEmptyErrorer");
proxy_class_testpkg_EmptyErrorer = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_EmptyErrorer_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/EmptyErrorer");
mid_EmptyErrorer_EmptyError = (*env)->GetMethodID(env, clazz, "emptyError", "()V");
clazz = (*env)->FindClass(env, "testpkg/Testpkg$proxyGoCallback");
proxy_class_testpkg_GoCallback = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_GoCallback_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/GoCallback");
mid_GoCallback_VarUpdate = (*env)->GetMethodID(env, clazz, "varUpdate", "()V");
clazz = (*env)->FindClass(env, "testpkg/Testpkg$proxyI");
proxy_class_testpkg_I = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_I_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/I");
mid_I_E = (*env)->GetMethodID(env, clazz, "e", "()V");
mid_I_F = (*env)->GetMethodID(env, clazz, "f", "()V");
mid_I_I = (*env)->GetMethodID(env, clazz, "i", "()Ltestpkg/I;");
mid_I_S = (*env)->GetMethodID(env, clazz, "s", "()Ltestpkg/S;");
mid_I_StoString = (*env)->GetMethodID(env, clazz, "stoString", "(Ltestpkg/S;)Ljava/lang/String;");
mid_I_String = (*env)->GetMethodID(env, clazz, "string", "()Ljava/lang/String;");
mid_I_V = (*env)->GetMethodID(env, clazz, "v", "()J");
mid_I_VE = (*env)->GetMethodID(env, clazz, "ve", "()J");
clazz = (*env)->FindClass(env, "testpkg/Testpkg$proxyI2");
proxy_class_testpkg_I2 = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_I2_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/I2");
mid_I2_Error = (*env)->GetMethodID(env, clazz, "error", "(Z)V");
mid_I2_StringError = (*env)->GetMethodID(env, clazz, "stringError", "(Ljava/lang/String;)Ljava/lang/String;");
mid_I2_Times = (*env)->GetMethodID(env, clazz, "times", "(I)J");
clazz = (*env)->FindClass(env, "testpkg/Testpkg$proxyImportedI");
proxy_class_testpkg_ImportedI = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_ImportedI_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/ImportedI");
mid_ImportedI_F = (*env)->GetMethodID(env, clazz, "f", "(TODO)V");
clazz = (*env)->FindClass(env, "testpkg/Testpkg$proxyInterface");
proxy_class_testpkg_Interface = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_Interface_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/Interface");
mid_Interface_F = (*env)->GetMethodID(env, clazz, "f", "()V");
clazz = (*env)->FindClass(env, "testpkg/Testpkg$proxyInterfaceDupper");
proxy_class_testpkg_InterfaceDupper = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_InterfaceDupper_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/InterfaceDupper");
mid_InterfaceDupper_IDup = (*env)->GetMethodID(env, clazz, "iDup", "(Ltestpkg/Interface;)Ltestpkg/Interface;");
clazz = (*env)->FindClass(env, "testpkg/Testpkg$proxyIssue14168");
proxy_class_testpkg_Issue14168 = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_Issue14168_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/Issue14168");
mid_Issue14168_F = (*env)->GetMethodID(env, clazz, "f", "(I)V");
clazz = (*env)->FindClass(env, "testpkg/Testpkg$proxyIssue17073");
proxy_class_testpkg_Issue17073 = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_Issue17073_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/Issue17073");
mid_Issue17073_OnError = (*env)->GetMethodID(env, clazz, "onError", "(Ljava/lang/Exception;)V");
clazz = (*env)->FindClass(env, "testpkg/Testpkg$proxyNullTest");
proxy_class_testpkg_NullTest = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_NullTest_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/NullTest");
mid_NullTest_Null = (*env)->GetMethodID(env, clazz, "null_", "()Ltestpkg/NullTest;");
clazz = (*env)->FindClass(env, "testpkg/Testpkg$proxyNummer");
proxy_class_testpkg_Nummer = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_Nummer_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/Nummer");
mid_Nummer_Num = (*env)->GetMethodID(env, clazz, "num", "()V");
clazz = (*env)->FindClass(env, "testpkg/Testpkg$proxyReceiver");
proxy_class_testpkg_Receiver = (*env)->NewGlobalRef(env, clazz);
proxy_class_testpkg_Receiver_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "testpkg/Receiver");
mid_Receiver_Hello = (*env)->GetMethodID(env, clazz, "hello", "(Ljava/lang/String;)V");
}
JNIEXPORT jlong JNICALL
Java_testpkg_Testpkg_add(JNIEnv* env, jclass _clazz, jlong x, jlong y) {
nint _x = (nint)x;
nint _y = (nint)y;
nint r0 = proxytestpkg__Add(_x, _y);
jlong _r0 = (jlong)r0;
return _r0;
}
JNIEXPORT jstring JNICALL
Java_testpkg_Testpkg_appendHello(JNIEnv* env, jclass _clazz, jstring s) {
nstring _s = go_seq_from_java_string(env, s);
nstring r0 = proxytestpkg__AppendHello(_s);
jstring _r0 = go_seq_to_java_string(env, r0);
return _r0;
}
JNIEXPORT jbyteArray JNICALL
Java_testpkg_Testpkg_appendToString(JNIEnv* env, jclass _clazz, jstring str, jbyteArray someBytes) {
nstring _str = go_seq_from_java_string(env, str);
nbyteslice _someBytes = go_seq_from_java_bytearray(env, someBytes, 0);
nbyteslice r0 = proxytestpkg__AppendToString(_str, _someBytes);
go_seq_release_byte_array(env, someBytes, _someBytes.ptr);
jbyteArray _r0 = go_seq_to_java_bytearray(env, r0, 1);
return _r0;
}
JNIEXPORT jbyteArray JNICALL
Java_testpkg_Testpkg_bytesAppend(JNIEnv* env, jclass _clazz, jbyteArray a, jbyteArray b) {
nbyteslice _a = go_seq_from_java_bytearray(env, a, 0);
nbyteslice _b = go_seq_from_java_bytearray(env, b, 0);
nbyteslice r0 = proxytestpkg__BytesAppend(_a, _b);
go_seq_release_byte_array(env, a, _a.ptr);
go_seq_release_byte_array(env, b, _b.ptr);
jbyteArray _r0 = go_seq_to_java_bytearray(env, r0, 1);
return _r0;
}
JNIEXPORT jboolean JNICALL
Java_testpkg_Testpkg_callCDupper(JNIEnv* env, jclass _clazz, jobject d) {
int32_t _d = go_seq_to_refnum(env, d);
char r0 = proxytestpkg__CallCDupper(_d);
jboolean _r0 = r0 ? JNI_TRUE : JNI_FALSE;
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_callE(JNIEnv* env, jclass _clazz, jobject i) {
int32_t _i = go_seq_to_refnum(env, i);
int32_t r0 = proxytestpkg__CallE(_i);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class__error, proxy_class__error_cons);
go_seq_maybe_throw_exception(env, _r0);
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_callEmptyError(JNIEnv* env, jclass _clazz, jobject c) {
int32_t _c = go_seq_to_refnum(env, c);
int32_t r0 = proxytestpkg__CallEmptyError(_c);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class__error, proxy_class__error_cons);
go_seq_maybe_throw_exception(env, _r0);
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_callF(JNIEnv* env, jclass _clazz, jobject i) {
int32_t _i = go_seq_to_refnum(env, i);
proxytestpkg__CallF(_i);
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_callI(JNIEnv* env, jclass _clazz, jobject i) {
int32_t _i = go_seq_to_refnum(env, i);
int32_t r0 = proxytestpkg__CallI(_i);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_I, proxy_class_testpkg_I_cons);
return _r0;
}
JNIEXPORT jboolean JNICALL
Java_testpkg_Testpkg_callIDupper(JNIEnv* env, jclass _clazz, jobject d) {
int32_t _d = go_seq_to_refnum(env, d);
char r0 = proxytestpkg__CallIDupper(_d);
jboolean _r0 = r0 ? JNI_TRUE : JNI_FALSE;
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_callIError(JNIEnv* env, jclass _clazz, jobject i, jboolean triggerError) {
int32_t _i = go_seq_to_refnum(env, i);
char _triggerError = (char)triggerError;
int32_t r0 = proxytestpkg__CallIError(_i, _triggerError);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class__error, proxy_class__error_cons);
go_seq_maybe_throw_exception(env, _r0);
}
JNIEXPORT jstring JNICALL
Java_testpkg_Testpkg_callIStringError(JNIEnv* env, jclass _clazz, jobject i, jstring s) {
int32_t _i = go_seq_to_refnum(env, i);
nstring _s = go_seq_from_java_string(env, s);
struct proxytestpkg__CallIStringError_return res = proxytestpkg__CallIStringError(_i, _s);
jstring _r0 = go_seq_to_java_string(env, res.r0);
jobject _r1 = go_seq_from_refnum(env, res.r1, proxy_class__error, proxy_class__error_cons);
go_seq_maybe_throw_exception(env, _r1);
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_callImportedI(JNIEnv* env, jclass _clazz, TODO i) {
TODO _i = (TODO)i;
proxytestpkg__CallImportedI(_i);
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_callS(JNIEnv* env, jclass _clazz, jobject i) {
int32_t _i = go_seq_to_refnum(env, i);
int32_t r0 = proxytestpkg__CallS(_i);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_S, proxy_class_testpkg_S_cons);
return _r0;
}
JNIEXPORT jdouble JNICALL
Java_testpkg_Testpkg_callSSum(JNIEnv* env, jclass _clazz, jobject s) {
int32_t _s = go_seq_to_refnum(env, s);
double r0 = proxytestpkg__CallSSum(_s);
jdouble _r0 = (jdouble)r0;
return _r0;
}
JNIEXPORT jlong JNICALL
Java_testpkg_Testpkg_callV(JNIEnv* env, jclass _clazz, jobject i) {
int32_t _i = go_seq_to_refnum(env, i);
nint r0 = proxytestpkg__CallV(_i);
jlong _r0 = (jlong)r0;
return _r0;
}
JNIEXPORT jlong JNICALL
Java_testpkg_Testpkg_callVE(JNIEnv* env, jclass _clazz, jobject i) {
int32_t _i = go_seq_to_refnum(env, i);
struct proxytestpkg__CallVE_return res = proxytestpkg__CallVE(_i);
jlong _r0 = (jlong)res.r0;
jobject _r1 = go_seq_from_refnum(env, res.r1, proxy_class__error, proxy_class__error_cons);
go_seq_maybe_throw_exception(env, _r1);
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_callWithCallback(JNIEnv* env, jclass _clazz, jobject gcb) {
int32_t _gcb = go_seq_to_refnum(env, gcb);
proxytestpkg__CallWithCallback(_gcb);
}
JNIEXPORT jboolean JNICALL
Java_testpkg_Testpkg_callWithNull(JNIEnv* env, jclass _clazz, jobject p0, jobject nuller) {
int32_t _p0 = go_seq_to_refnum(env, p0);
int32_t _nuller = go_seq_to_refnum(env, nuller);
char r0 = proxytestpkg__CallWithNull(_p0, _nuller);
jboolean _r0 = r0 ? JNI_TRUE : JNI_FALSE;
return _r0;
}
JNIEXPORT jlong JNICALL
Java_testpkg_Testpkg_collectS2(JNIEnv* env, jclass _clazz, jlong want, jlong timeoutSec) {
nint _want = (nint)want;
nint _timeoutSec = (nint)timeoutSec;
nint r0 = proxytestpkg__CollectS2(_want, _timeoutSec);
jlong _r0 = (jlong)r0;
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_emptyError(JNIEnv* env, jclass _clazz) {
int32_t r0 = proxytestpkg__EmptyError();
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class__error, proxy_class__error_cons);
go_seq_maybe_throw_exception(env, _r0);
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_err(JNIEnv* env, jclass _clazz, jstring s) {
nstring _s = go_seq_from_java_string(env, s);
int32_t r0 = proxytestpkg__Err(_s);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class__error, proxy_class__error_cons);
go_seq_maybe_throw_exception(env, _r0);
}
JNIEXPORT jstring JNICALL
Java_testpkg_Testpkg_errorMessage(JNIEnv* env, jclass _clazz, jobject err) {
int32_t _err = go_seq_to_refnum(env, err);
nstring r0 = proxytestpkg__ErrorMessage(_err);
jstring _r0 = go_seq_to_java_string(env, r0);
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_gc(JNIEnv* env, jclass _clazz) {
proxytestpkg__GC();
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_garbageCollect(JNIEnv* env, jclass _clazz) {
proxytestpkg__GarbageCollect();
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_goroutineCallback(JNIEnv* env, jclass _clazz, jobject r) {
int32_t _r = go_seq_to_refnum(env, r);
proxytestpkg__GoroutineCallback(_r);
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_hello(JNIEnv* env, jclass _clazz, jobject r, jstring name) {
int32_t _r = go_seq_to_refnum(env, r);
nstring _name = go_seq_from_java_string(env, name);
proxytestpkg__Hello(_r, _name);
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_hi(JNIEnv* env, jclass _clazz) {
proxytestpkg__Hi();
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_i2Dup(JNIEnv* env, jclass _clazz, jobject i) {
int32_t _i = go_seq_to_refnum(env, i);
int32_t r0 = proxytestpkg__I2Dup(_i);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_I2, proxy_class_testpkg_I2_cons);
return _r0;
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_iDup(JNIEnv* env, jclass _clazz, jobject i) {
int32_t _i = go_seq_to_refnum(env, i);
int32_t r0 = proxytestpkg__IDup(_i);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_I, proxy_class_testpkg_I_cons);
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_init(JNIEnv* env, jclass _clazz) {
proxytestpkg__Init();
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_int_1(JNIEnv* env, jclass _clazz, jint x) {
int32_t _x = (int32_t)x;
proxytestpkg__Int(_x);
}
JNIEXPORT jboolean JNICALL
Java_testpkg_Testpkg_isGlobalErr(JNIEnv* env, jclass _clazz, jobject err) {
int32_t _err = go_seq_to_refnum(env, err);
char r0 = proxytestpkg__IsGlobalErr(_err);
jboolean _r0 = r0 ? JNI_TRUE : JNI_FALSE;
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_keep(JNIEnv* env, jclass _clazz, jobject i) {
int32_t _i = go_seq_to_refnum(env, i);
proxytestpkg__Keep(_i);
}
JNIEXPORT jlong JNICALL
Java_testpkg_Testpkg_multiply(JNIEnv* env, jclass _clazz, jint idx, jint val) {
int32_t _idx = (int32_t)idx;
int32_t _val = (int32_t)val;
int64_t r0 = proxytestpkg__Multiply(_idx, _val);
jlong _r0 = (jlong)r0;
return _r0;
}
JNIEXPORT jboolean JNICALL
Java_testpkg_Testpkg_negate(JNIEnv* env, jclass _clazz, jboolean x) {
char _x = (char)x;
char r0 = proxytestpkg__Negate(_x);
jboolean _r0 = r0 ? JNI_TRUE : JNI_FALSE;
return _r0;
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_new_1(JNIEnv* env, jclass _clazz) {
int32_t r0 = proxytestpkg__New();
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_S, proxy_class_testpkg_S_cons);
return _r0;
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_newConcrete(JNIEnv* env, jclass _clazz) {
int32_t r0 = proxytestpkg__NewConcrete();
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_Concrete, proxy_class_testpkg_Concrete_cons);
return _r0;
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_newI(JNIEnv* env, jclass _clazz) {
int32_t r0 = proxytestpkg__NewI();
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_I2, proxy_class_testpkg_I2_cons);
return _r0;
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_newImportedFields(JNIEnv* env, jclass _clazz) {
int32_t r0 = proxytestpkg__NewImportedFields();
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_ImportedFields, proxy_class_testpkg_ImportedFields_cons);
return _r0;
}
JNIEXPORT TODO JNICALL
Java_testpkg_Testpkg_newImportedI(JNIEnv* env, jclass _clazz) {
TODO r0 = proxytestpkg__NewImportedI();
TODO _r0 = (TODO)r0;
return _r0;
}
// skipped function NewImportedS with unsupported parameter or return types
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_newInitCaller(JNIEnv* env, jclass _clazz) {
int32_t r0 = proxytestpkg__NewInitCaller();
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_InitCaller, proxy_class_testpkg_InitCaller_cons);
return _r0;
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_newNode(JNIEnv* env, jclass _clazz, jstring name) {
nstring _name = go_seq_from_java_string(env, name);
int32_t r0 = proxytestpkg__NewNode(_name);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_Node, proxy_class_testpkg_Node_cons);
return _r0;
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_newNullFieldStruct(JNIEnv* env, jclass _clazz) {
int32_t r0 = proxytestpkg__NewNullFieldStruct();
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_NullFieldStruct, proxy_class_testpkg_NullFieldStruct_cons);
return _r0;
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_newNullInterface(JNIEnv* env, jclass _clazz) {
int32_t r0 = proxytestpkg__NewNullInterface();
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_I, proxy_class_testpkg_I_cons);
return _r0;
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_newNullStruct(JNIEnv* env, jclass _clazz) {
int32_t r0 = proxytestpkg__NewNullStruct();
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_S, proxy_class_testpkg_S_cons);
return _r0;
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_newS2(JNIEnv* env, jclass _clazz, jdouble x, jdouble y) {
double _x = (double)x;
double _y = (double)y;
int32_t r0 = proxytestpkg__NewS2(_x, _y);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_S2, proxy_class_testpkg_S2_cons);
return _r0;
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_newS4WithBoolAndError(JNIEnv* env, jclass _clazz, jboolean b) {
char _b = (char)b;
struct proxytestpkg__NewS4WithBoolAndError_return res = proxytestpkg__NewS4WithBoolAndError(_b);
jobject _r0 = go_seq_from_refnum(env, res.r0, proxy_class_testpkg_S4, proxy_class_testpkg_S4_cons);
jobject _r1 = go_seq_from_refnum(env, res.r1, proxy_class__error, proxy_class__error_cons);
go_seq_maybe_throw_exception(env, _r1);
return _r0;
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_newS4WithFloat(JNIEnv* env, jclass _clazz, jdouble f) {
double _f = (double)f;
int32_t r0 = proxytestpkg__NewS4WithFloat(_f);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_S4, proxy_class_testpkg_S4_cons);
return _r0;
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_newS4WithInt(JNIEnv* env, jclass _clazz, jlong i) {
nint _i = (nint)i;
int32_t r0 = proxytestpkg__NewS4WithInt(_i);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_S4, proxy_class_testpkg_S4_cons);
return _r0;
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_newSer(JNIEnv* env, jclass _clazz) {
int32_t r0 = proxytestpkg__NewSer();
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_AnSer, proxy_class_testpkg_AnSer_cons);
return _r0;
}
// skipped function NewSimpleS with unsupported parameter or return types
JNIEXPORT jlong JNICALL
Java_testpkg_Testpkg_numSCollected(JNIEnv* env, jclass _clazz) {
nint r0 = proxytestpkg__NumSCollected();
jlong _r0 = (jlong)r0;
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_passByteArray(JNIEnv* env, jclass _clazz, jobject b) {
int32_t _b = go_seq_to_refnum(env, b);
proxytestpkg__PassByteArray(_b);
}
JNIEXPORT jstring JNICALL
Java_testpkg_Testpkg_readAsset(JNIEnv* env, jclass _clazz) {
nstring r0 = proxytestpkg__ReadAsset();
jstring _r0 = go_seq_to_java_string(env, r0);
return _r0;
}
JNIEXPORT jlong JNICALL
Java_testpkg_Testpkg_readIntoByteArray(JNIEnv* env, jclass _clazz, jbyteArray s) {
nbyteslice _s = go_seq_from_java_bytearray(env, s, 0);
struct proxytestpkg__ReadIntoByteArray_return res = proxytestpkg__ReadIntoByteArray(_s);
go_seq_release_byte_array(env, s, _s.ptr);
jlong _r0 = (jlong)res.r0;
jobject _r1 = go_seq_from_refnum(env, res.r1, proxy_class__error, proxy_class__error_cons);
go_seq_maybe_throw_exception(env, _r1);
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_registerI(JNIEnv* env, jclass _clazz, jint idx, jobject i) {
int32_t _idx = (int32_t)idx;
int32_t _i = go_seq_to_refnum(env, i);
proxytestpkg__RegisterI(_idx, _i);
}
JNIEXPORT jstring JNICALL
Java_testpkg_Testpkg_returnsError(JNIEnv* env, jclass _clazz, jboolean b) {
char _b = (char)b;
struct proxytestpkg__ReturnsError_return res = proxytestpkg__ReturnsError(_b);
jstring _r0 = go_seq_to_java_string(env, res.r0);
jobject _r1 = go_seq_from_refnum(env, res.r1, proxy_class__error, proxy_class__error_cons);
go_seq_maybe_throw_exception(env, _r1);
return _r0;
}
JNIEXPORT jstring JNICALL
Java_testpkg_Testpkg_strDup(JNIEnv* env, jclass _clazz, jstring s) {
nstring _s = go_seq_from_java_string(env, s);
nstring r0 = proxytestpkg__StrDup(_s);
jstring _r0 = go_seq_to_java_string(env, r0);
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_testSIGPIPE(JNIEnv* env, jclass _clazz) {
proxytestpkg__TestSIGPIPE();
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_unboundI(JNIEnv* env, jclass _clazz, TODO p0) {
TODO _p0 = (TODO)p0;
proxytestpkg__UnboundI(_p0);
}
// skipped function UnboundS with unsupported parameter or return types
JNIEXPORT jlong JNICALL
Java_testpkg_Testpkg_unnamedParams(JNIEnv* env, jclass _clazz, jlong p0, jlong p1, jstring p2) {
nint _p0 = (nint)p0;
nint _p1 = (nint)p1;
nstring _p2 = go_seq_from_java_string(env, p2);
nint r0 = proxytestpkg__UnnamedParams(_p0, _p1, _p2);
jlong _r0 = (jlong)r0;
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_unregisterI(JNIEnv* env, jclass _clazz, jint idx) {
int32_t _idx = (int32_t)idx;
proxytestpkg__UnregisterI(_idx);
}
JNIEXPORT TODO JNICALL
Java_testpkg_Testpkg_withImportedI(JNIEnv* env, jclass _clazz, TODO i) {
TODO _i = (TODO)i;
TODO r0 = proxytestpkg__WithImportedI(_i);
TODO _r0 = (TODO)r0;
return _r0;
}
// skipped function WithImportedS with unsupported parameter or return types
JNIEXPORT jobject JNICALL
Java_testpkg_AnSer__1_1New(JNIEnv *env, jclass clazz) {
int32_t refnum = new_testpkg_AnSer();
return go_seq_from_refnum(env, refnum, NULL, NULL);
}
// skipped function AnSer.S with unsupported parameter or return types
JNIEXPORT jobject JNICALL
Java_testpkg_Concrete__1_1NewConcrete(JNIEnv *env, jclass clazz) {
int32_t refnum = proxytestpkg__NewConcrete();
return go_seq_from_refnum(env, refnum, NULL, NULL);
}
JNIEXPORT void JNICALL
Java_testpkg_Concrete_f(JNIEnv* env, jobject __this__) {
int32_t o = go_seq_to_refnum_go(env, __this__);
proxytestpkg_Concrete_F(o);
}
JNIEXPORT jobject JNICALL
Java_testpkg_ImportedFields__1_1NewImportedFields(JNIEnv *env, jclass clazz) {
int32_t refnum = proxytestpkg__NewImportedFields();
return go_seq_from_refnum(env, refnum, NULL, NULL);
}
JNIEXPORT void JNICALL
Java_testpkg_ImportedFields_setI(JNIEnv *env, jobject this, TODO v) {
int32_t o = go_seq_to_refnum_go(env, this);
TODO _v = (TODO)v;
proxytestpkg_ImportedFields_I_Set(o, _v);
}
JNIEXPORT TODO JNICALL
Java_testpkg_ImportedFields_getI(JNIEnv *env, jobject this) {
int32_t o = go_seq_to_refnum_go(env, this);
TODO r0 = proxytestpkg_ImportedFields_I_Get(o);
TODO _r0 = (TODO)r0;
return _r0;
}
// skipped field ImportedFields with unsupported type: *types.Pointer
JNIEXPORT jobject JNICALL
Java_testpkg_InitCaller__1_1NewInitCaller(JNIEnv *env, jclass clazz) {
int32_t refnum = proxytestpkg__NewInitCaller();
return go_seq_from_refnum(env, refnum, NULL, NULL);
}
JNIEXPORT void JNICALL
Java_testpkg_InitCaller_init(JNIEnv* env, jobject __this__) {
int32_t o = go_seq_to_refnum_go(env, __this__);
proxytestpkg_InitCaller_Init(o);
}
JNIEXPORT jobject JNICALL
Java_testpkg_Node__1_1NewNode(JNIEnv *env, jclass clazz, jstring name) {
nstring _name = go_seq_from_java_string(env, name);
int32_t refnum = proxytestpkg__NewNode(_name);
return go_seq_from_refnum(env, refnum, NULL, NULL);
}
JNIEXPORT jstring JNICALL
Java_testpkg_Node_string(JNIEnv* env, jobject __this__) {
int32_t o = go_seq_to_refnum_go(env, __this__);
nstring r0 = proxytestpkg_Node_String(o);
jstring _r0 = go_seq_to_java_string(env, r0);
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_Node_setV(JNIEnv *env, jobject this, jstring v) {
int32_t o = go_seq_to_refnum_go(env, this);
nstring _v = go_seq_from_java_string(env, v);
proxytestpkg_Node_V_Set(o, _v);
}
JNIEXPORT jstring JNICALL
Java_testpkg_Node_getV(JNIEnv *env, jobject this) {
int32_t o = go_seq_to_refnum_go(env, this);
nstring r0 = proxytestpkg_Node_V_Get(o);
jstring _r0 = go_seq_to_java_string(env, r0);
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_Node_setNext(JNIEnv *env, jobject this, jobject v) {
int32_t o = go_seq_to_refnum_go(env, this);
int32_t _v = go_seq_to_refnum(env, v);
proxytestpkg_Node_Next_Set(o, _v);
}
JNIEXPORT jobject JNICALL
Java_testpkg_Node_getNext(JNIEnv *env, jobject this) {
int32_t o = go_seq_to_refnum_go(env, this);
int32_t r0 = proxytestpkg_Node_Next_Get(o);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_Node, proxy_class_testpkg_Node_cons);
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_Node_setErr(JNIEnv *env, jobject this, jobject v) {
int32_t o = go_seq_to_refnum_go(env, this);
int32_t _v = go_seq_to_refnum(env, v);
proxytestpkg_Node_Err_Set(o, _v);
}
JNIEXPORT jobject JNICALL
Java_testpkg_Node_getErr(JNIEnv *env, jobject this) {
int32_t o = go_seq_to_refnum_go(env, this);
int32_t r0 = proxytestpkg_Node_Err_Get(o);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class__error, proxy_class__error_cons);
return _r0;
}
JNIEXPORT jobject JNICALL
Java_testpkg_NullFieldStruct__1_1NewNullFieldStruct(JNIEnv *env, jclass clazz) {
int32_t refnum = proxytestpkg__NewNullFieldStruct();
return go_seq_from_refnum(env, refnum, NULL, NULL);
}
JNIEXPORT void JNICALL
Java_testpkg_NullFieldStruct_setF(JNIEnv *env, jobject this, jobject v) {
int32_t o = go_seq_to_refnum_go(env, this);
int32_t _v = go_seq_to_refnum(env, v);
proxytestpkg_NullFieldStruct_F_Set(o, _v);
}
JNIEXPORT jobject JNICALL
Java_testpkg_NullFieldStruct_getF(JNIEnv *env, jobject this) {
int32_t o = go_seq_to_refnum_go(env, this);
int32_t r0 = proxytestpkg_NullFieldStruct_F_Get(o);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_S, proxy_class_testpkg_S_cons);
return _r0;
}
JNIEXPORT jobject JNICALL
Java_testpkg_S__1_1New(JNIEnv *env, jclass clazz) {
int32_t refnum = new_testpkg_S();
return go_seq_from_refnum(env, refnum, NULL, NULL);
}
JNIEXPORT void JNICALL
Java_testpkg_S_f(JNIEnv* env, jobject __this__) {
int32_t o = go_seq_to_refnum_go(env, __this__);
proxytestpkg_S_F(o);
}
JNIEXPORT jstring JNICALL
Java_testpkg_S_string(JNIEnv* env, jobject __this__) {
int32_t o = go_seq_to_refnum_go(env, __this__);
nstring r0 = proxytestpkg_S_String(o);
jstring _r0 = go_seq_to_java_string(env, r0);
return _r0;
}
JNIEXPORT jobject JNICALL
Java_testpkg_S2__1_1NewS2(JNIEnv *env, jclass clazz, jdouble x, jdouble y) {
double _x = (double)x;
double _y = (double)y;
int32_t refnum = proxytestpkg__NewS2(_x, _y);
return go_seq_from_refnum(env, refnum, NULL, NULL);
}
JNIEXPORT jdouble JNICALL
Java_testpkg_S2_sum(JNIEnv* env, jobject __this__) {
int32_t o = go_seq_to_refnum_go(env, __this__);
double r0 = proxytestpkg_S2_Sum(o);
jdouble _r0 = (jdouble)r0;
return _r0;
}
JNIEXPORT jstring JNICALL
Java_testpkg_S2_tryTwoStrings(JNIEnv* env, jobject __this__, jstring first, jstring second) {
int32_t o = go_seq_to_refnum_go(env, __this__);
nstring _first = go_seq_from_java_string(env, first);
nstring _second = go_seq_from_java_string(env, second);
nstring r0 = proxytestpkg_S2_TryTwoStrings(o, _first, _second);
jstring _r0 = go_seq_to_java_string(env, r0);
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_S2_setX(JNIEnv *env, jobject this, jdouble v) {
int32_t o = go_seq_to_refnum_go(env, this);
double _v = (double)v;
proxytestpkg_S2_X_Set(o, _v);
}
JNIEXPORT jdouble JNICALL
Java_testpkg_S2_getX(JNIEnv *env, jobject this) {
int32_t o = go_seq_to_refnum_go(env, this);
double r0 = proxytestpkg_S2_X_Get(o);
jdouble _r0 = (jdouble)r0;
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_S2_setY(JNIEnv *env, jobject this, jdouble v) {
int32_t o = go_seq_to_refnum_go(env, this);
double _v = (double)v;
proxytestpkg_S2_Y_Set(o, _v);
}
JNIEXPORT jdouble JNICALL
Java_testpkg_S2_getY(JNIEnv *env, jobject this) {
int32_t o = go_seq_to_refnum_go(env, this);
double r0 = proxytestpkg_S2_Y_Get(o);
jdouble _r0 = (jdouble)r0;
return _r0;
}
JNIEXPORT jobject JNICALL
Java_testpkg_S3__1_1New(JNIEnv *env, jclass clazz) {
int32_t refnum = new_testpkg_S3();
return go_seq_from_refnum(env, refnum, NULL, NULL);
}
JNIEXPORT jobject JNICALL
Java_testpkg_S4__1_1NewS4WithBoolAndError(JNIEnv *env, jclass clazz, jboolean b) {
char _b = (char)b;
struct proxytestpkg__NewS4WithBoolAndError_return res = proxytestpkg__NewS4WithBoolAndError(_b);
int32_t refnum = res.r0;
jobject _err = go_seq_from_refnum(env, res.r1, proxy_class__error, proxy_class__error_cons);
go_seq_maybe_throw_exception(env, _err);
return go_seq_from_refnum(env, refnum, NULL, NULL);
}
JNIEXPORT jobject JNICALL
Java_testpkg_S4__1_1NewS4WithFloat(JNIEnv *env, jclass clazz, jdouble f) {
double _f = (double)f;
int32_t refnum = proxytestpkg__NewS4WithFloat(_f);
return go_seq_from_refnum(env, refnum, NULL, NULL);
}
JNIEXPORT jobject JNICALL
Java_testpkg_S4__1_1NewS4WithInt(JNIEnv *env, jclass clazz, jlong i) {
nint _i = (nint)i;
int32_t refnum = proxytestpkg__NewS4WithInt(_i);
return go_seq_from_refnum(env, refnum, NULL, NULL);
}
JNIEXPORT void JNICALL
Java_testpkg_S4_setI(JNIEnv *env, jobject this, jlong v) {
int32_t o = go_seq_to_refnum_go(env, this);
nint _v = (nint)v;
proxytestpkg_S4_I_Set(o, _v);
}
JNIEXPORT jlong JNICALL
Java_testpkg_S4_getI(JNIEnv *env, jobject this) {
int32_t o = go_seq_to_refnum_go(env, this);
nint r0 = proxytestpkg_S4_I_Get(o);
jlong _r0 = (jlong)r0;
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_00024proxyB_b(JNIEnv* env, jobject __this__, jbyteArray b) {
int32_t o = go_seq_to_refnum_go(env, __this__);
nbyteslice _b = go_seq_from_java_bytearray(env, b, 0);
proxytestpkg_B_B(o, _b);
go_seq_release_byte_array(env, b, _b.ptr);
}
void cproxytestpkg_B_B(int32_t refnum, nbyteslice b) {
JNIEnv *env = go_seq_push_local_frame(1);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_B, proxy_class_testpkg_B_cons);
jbyteArray _b = go_seq_to_java_bytearray(env, b, 0);
(*env)->CallVoidMethod(env, o, mid_B_B, _b);
go_seq_pop_local_frame(env);
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_00024proxyConcreteDupper_cDup(JNIEnv* env, jobject __this__, jobject c) {
int32_t o = go_seq_to_refnum_go(env, __this__);
int32_t _c = go_seq_to_refnum(env, c);
int32_t r0 = proxytestpkg_ConcreteDupper_CDup(o, _c);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_Concrete, proxy_class_testpkg_Concrete_cons);
return _r0;
}
int32_t cproxytestpkg_ConcreteDupper_CDup(int32_t refnum, int32_t c) {
JNIEnv *env = go_seq_push_local_frame(1);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_ConcreteDupper, proxy_class_testpkg_ConcreteDupper_cons);
jobject _c = go_seq_from_refnum(env, c, proxy_class_testpkg_Concrete, proxy_class_testpkg_Concrete_cons);
jobject res = (*env)->CallObjectMethod(env, o, mid_ConcreteDupper_CDup, _c);
int32_t _res = go_seq_to_refnum(env, res);
go_seq_pop_local_frame(env);
return _res;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_00024proxyEmptyErrorer_emptyError(JNIEnv* env, jobject __this__) {
int32_t o = go_seq_to_refnum_go(env, __this__);
int32_t r0 = proxytestpkg_EmptyErrorer_EmptyError(o);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class__error, proxy_class__error_cons);
go_seq_maybe_throw_exception(env, _r0);
}
int32_t cproxytestpkg_EmptyErrorer_EmptyError(int32_t refnum) {
JNIEnv *env = go_seq_push_local_frame(0);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_EmptyErrorer, proxy_class_testpkg_EmptyErrorer_cons);
(*env)->CallVoidMethod(env, o, mid_EmptyErrorer_EmptyError);
jobject exc = go_seq_get_exception(env);
int32_t _exc = go_seq_to_refnum(env, exc);
go_seq_pop_local_frame(env);
return _exc;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_00024proxyGoCallback_varUpdate(JNIEnv* env, jobject __this__) {
int32_t o = go_seq_to_refnum_go(env, __this__);
proxytestpkg_GoCallback_VarUpdate(o);
}
void cproxytestpkg_GoCallback_VarUpdate(int32_t refnum) {
JNIEnv *env = go_seq_push_local_frame(0);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_GoCallback, proxy_class_testpkg_GoCallback_cons);
(*env)->CallVoidMethod(env, o, mid_GoCallback_VarUpdate);
go_seq_pop_local_frame(env);
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_00024proxyI_e(JNIEnv* env, jobject __this__) {
int32_t o = go_seq_to_refnum_go(env, __this__);
int32_t r0 = proxytestpkg_I_E(o);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class__error, proxy_class__error_cons);
go_seq_maybe_throw_exception(env, _r0);
}
int32_t cproxytestpkg_I_E(int32_t refnum) {
JNIEnv *env = go_seq_push_local_frame(0);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_I, proxy_class_testpkg_I_cons);
(*env)->CallVoidMethod(env, o, mid_I_E);
jobject exc = go_seq_get_exception(env);
int32_t _exc = go_seq_to_refnum(env, exc);
go_seq_pop_local_frame(env);
return _exc;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_00024proxyI_f(JNIEnv* env, jobject __this__) {
int32_t o = go_seq_to_refnum_go(env, __this__);
proxytestpkg_I_F(o);
}
void cproxytestpkg_I_F(int32_t refnum) {
JNIEnv *env = go_seq_push_local_frame(0);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_I, proxy_class_testpkg_I_cons);
(*env)->CallVoidMethod(env, o, mid_I_F);
go_seq_pop_local_frame(env);
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_00024proxyI_i(JNIEnv* env, jobject __this__) {
int32_t o = go_seq_to_refnum_go(env, __this__);
int32_t r0 = proxytestpkg_I_I(o);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_I, proxy_class_testpkg_I_cons);
return _r0;
}
int32_t cproxytestpkg_I_I(int32_t refnum) {
JNIEnv *env = go_seq_push_local_frame(0);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_I, proxy_class_testpkg_I_cons);
jobject res = (*env)->CallObjectMethod(env, o, mid_I_I);
int32_t _res = go_seq_to_refnum(env, res);
go_seq_pop_local_frame(env);
return _res;
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_00024proxyI_s(JNIEnv* env, jobject __this__) {
int32_t o = go_seq_to_refnum_go(env, __this__);
int32_t r0 = proxytestpkg_I_S(o);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_S, proxy_class_testpkg_S_cons);
return _r0;
}
int32_t cproxytestpkg_I_S(int32_t refnum) {
JNIEnv *env = go_seq_push_local_frame(0);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_I, proxy_class_testpkg_I_cons);
jobject res = (*env)->CallObjectMethod(env, o, mid_I_S);
int32_t _res = go_seq_to_refnum(env, res);
go_seq_pop_local_frame(env);
return _res;
}
JNIEXPORT jstring JNICALL
Java_testpkg_Testpkg_00024proxyI_stoString(JNIEnv* env, jobject __this__, jobject seq) {
int32_t o = go_seq_to_refnum_go(env, __this__);
int32_t _seq = go_seq_to_refnum(env, seq);
nstring r0 = proxytestpkg_I_StoString(o, _seq);
jstring _r0 = go_seq_to_java_string(env, r0);
return _r0;
}
nstring cproxytestpkg_I_StoString(int32_t refnum, int32_t seq) {
JNIEnv *env = go_seq_push_local_frame(1);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_I, proxy_class_testpkg_I_cons);
jobject _seq = go_seq_from_refnum(env, seq, proxy_class_testpkg_S, proxy_class_testpkg_S_cons);
jstring res = (*env)->CallObjectMethod(env, o, mid_I_StoString, _seq);
nstring _res = go_seq_from_java_string(env, res);
go_seq_pop_local_frame(env);
return _res;
}
JNIEXPORT jstring JNICALL
Java_testpkg_Testpkg_00024proxyI_string(JNIEnv* env, jobject __this__) {
int32_t o = go_seq_to_refnum_go(env, __this__);
nstring r0 = proxytestpkg_I_String(o);
jstring _r0 = go_seq_to_java_string(env, r0);
return _r0;
}
nstring cproxytestpkg_I_String(int32_t refnum) {
JNIEnv *env = go_seq_push_local_frame(0);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_I, proxy_class_testpkg_I_cons);
jstring res = (*env)->CallObjectMethod(env, o, mid_I_String);
nstring _res = go_seq_from_java_string(env, res);
go_seq_pop_local_frame(env);
return _res;
}
JNIEXPORT jlong JNICALL
Java_testpkg_Testpkg_00024proxyI_v(JNIEnv* env, jobject __this__) {
int32_t o = go_seq_to_refnum_go(env, __this__);
nint r0 = proxytestpkg_I_V(o);
jlong _r0 = (jlong)r0;
return _r0;
}
nint cproxytestpkg_I_V(int32_t refnum) {
JNIEnv *env = go_seq_push_local_frame(0);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_I, proxy_class_testpkg_I_cons);
jlong res = (*env)->CallLongMethod(env, o, mid_I_V);
nint _res = (nint)res;
go_seq_pop_local_frame(env);
return _res;
}
JNIEXPORT jlong JNICALL
Java_testpkg_Testpkg_00024proxyI_ve(JNIEnv* env, jobject __this__) {
int32_t o = go_seq_to_refnum_go(env, __this__);
struct proxytestpkg_I_VE_return res = proxytestpkg_I_VE(o);
jlong _r0 = (jlong)res.r0;
jobject _r1 = go_seq_from_refnum(env, res.r1, proxy_class__error, proxy_class__error_cons);
go_seq_maybe_throw_exception(env, _r1);
return _r0;
}
struct cproxytestpkg_I_VE_return cproxytestpkg_I_VE(int32_t refnum) {
JNIEnv *env = go_seq_push_local_frame(0);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_I, proxy_class_testpkg_I_cons);
jlong res = (*env)->CallLongMethod(env, o, mid_I_VE);
jobject exc = go_seq_get_exception(env);
int32_t _exc = go_seq_to_refnum(env, exc);
if (exc != NULL) {
res = 0;
}
nint _res = (nint)res;
cproxytestpkg_I_VE_return sres = {
_res, _exc
};
go_seq_pop_local_frame(env);
return sres;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_00024proxyI2_error(JNIEnv* env, jobject __this__, jboolean triggerError) {
int32_t o = go_seq_to_refnum_go(env, __this__);
char _triggerError = (char)triggerError;
int32_t r0 = proxytestpkg_I2_Error(o, _triggerError);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class__error, proxy_class__error_cons);
go_seq_maybe_throw_exception(env, _r0);
}
int32_t cproxytestpkg_I2_Error(int32_t refnum, char triggerError) {
JNIEnv *env = go_seq_push_local_frame(1);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_I2, proxy_class_testpkg_I2_cons);
jboolean _triggerError = triggerError ? JNI_TRUE : JNI_FALSE;
(*env)->CallVoidMethod(env, o, mid_I2_Error, _triggerError);
jobject exc = go_seq_get_exception(env);
int32_t _exc = go_seq_to_refnum(env, exc);
go_seq_pop_local_frame(env);
return _exc;
}
JNIEXPORT jstring JNICALL
Java_testpkg_Testpkg_00024proxyI2_stringError(JNIEnv* env, jobject __this__, jstring s) {
int32_t o = go_seq_to_refnum_go(env, __this__);
nstring _s = go_seq_from_java_string(env, s);
struct proxytestpkg_I2_StringError_return res = proxytestpkg_I2_StringError(o, _s);
jstring _r0 = go_seq_to_java_string(env, res.r0);
jobject _r1 = go_seq_from_refnum(env, res.r1, proxy_class__error, proxy_class__error_cons);
go_seq_maybe_throw_exception(env, _r1);
return _r0;
}
struct cproxytestpkg_I2_StringError_return cproxytestpkg_I2_StringError(int32_t refnum, nstring s) {
JNIEnv *env = go_seq_push_local_frame(1);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_I2, proxy_class_testpkg_I2_cons);
jstring _s = go_seq_to_java_string(env, s);
jstring res = (*env)->CallObjectMethod(env, o, mid_I2_StringError, _s);
jobject exc = go_seq_get_exception(env);
int32_t _exc = go_seq_to_refnum(env, exc);
if (exc != NULL) {
res = NULL;
}
nstring _res = go_seq_from_java_string(env, res);
cproxytestpkg_I2_StringError_return sres = {
_res, _exc
};
go_seq_pop_local_frame(env);
return sres;
}
JNIEXPORT jlong JNICALL
Java_testpkg_Testpkg_00024proxyI2_times(JNIEnv* env, jobject __this__, jint v) {
int32_t o = go_seq_to_refnum_go(env, __this__);
int32_t _v = (int32_t)v;
int64_t r0 = proxytestpkg_I2_Times(o, _v);
jlong _r0 = (jlong)r0;
return _r0;
}
int64_t cproxytestpkg_I2_Times(int32_t refnum, int32_t v) {
JNIEnv *env = go_seq_push_local_frame(1);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_I2, proxy_class_testpkg_I2_cons);
jint _v = (jint)v;
jlong res = (*env)->CallLongMethod(env, o, mid_I2_Times, _v);
int64_t _res = (int64_t)res;
go_seq_pop_local_frame(env);
return _res;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_00024proxyImportedI_f(JNIEnv* env, jobject __this__, TODO p0) {
int32_t o = go_seq_to_refnum_go(env, __this__);
TODO _p0 = (TODO)p0;
proxytestpkg_ImportedI_F(o, _p0);
}
void cproxytestpkg_ImportedI_F(int32_t refnum, TODO p0) {
JNIEnv *env = go_seq_push_local_frame(1);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_ImportedI, proxy_class_testpkg_ImportedI_cons);
TODO _p0 = (TODO)p0;
(*env)->CallVoidMethod(env, o, mid_ImportedI_F, _p0);
go_seq_pop_local_frame(env);
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_00024proxyInterface_f(JNIEnv* env, jobject __this__) {
int32_t o = go_seq_to_refnum_go(env, __this__);
proxytestpkg_Interface_F(o);
}
void cproxytestpkg_Interface_F(int32_t refnum) {
JNIEnv *env = go_seq_push_local_frame(0);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_Interface, proxy_class_testpkg_Interface_cons);
(*env)->CallVoidMethod(env, o, mid_Interface_F);
go_seq_pop_local_frame(env);
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_00024proxyInterfaceDupper_iDup(JNIEnv* env, jobject __this__, jobject i) {
int32_t o = go_seq_to_refnum_go(env, __this__);
int32_t _i = go_seq_to_refnum(env, i);
int32_t r0 = proxytestpkg_InterfaceDupper_IDup(o, _i);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_Interface, proxy_class_testpkg_Interface_cons);
return _r0;
}
int32_t cproxytestpkg_InterfaceDupper_IDup(int32_t refnum, int32_t i) {
JNIEnv *env = go_seq_push_local_frame(1);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_InterfaceDupper, proxy_class_testpkg_InterfaceDupper_cons);
jobject _i = go_seq_from_refnum(env, i, proxy_class_testpkg_Interface, proxy_class_testpkg_Interface_cons);
jobject res = (*env)->CallObjectMethod(env, o, mid_InterfaceDupper_IDup, _i);
int32_t _res = go_seq_to_refnum(env, res);
go_seq_pop_local_frame(env);
return _res;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_00024proxyIssue14168_f(JNIEnv* env, jobject __this__, jint seq) {
int32_t o = go_seq_to_refnum_go(env, __this__);
int32_t _seq = (int32_t)seq;
proxytestpkg_Issue14168_F(o, _seq);
}
void cproxytestpkg_Issue14168_F(int32_t refnum, int32_t seq) {
JNIEnv *env = go_seq_push_local_frame(1);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_Issue14168, proxy_class_testpkg_Issue14168_cons);
jint _seq = (jint)seq;
(*env)->CallVoidMethod(env, o, mid_Issue14168_F, _seq);
go_seq_pop_local_frame(env);
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_00024proxyIssue17073_onError(JNIEnv* env, jobject __this__, jobject err) {
int32_t o = go_seq_to_refnum_go(env, __this__);
int32_t _err = go_seq_to_refnum(env, err);
proxytestpkg_Issue17073_OnError(o, _err);
}
void cproxytestpkg_Issue17073_OnError(int32_t refnum, int32_t err) {
JNIEnv *env = go_seq_push_local_frame(1);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_Issue17073, proxy_class_testpkg_Issue17073_cons);
jobject _err = go_seq_from_refnum(env, err, proxy_class__error, proxy_class__error_cons);
(*env)->CallVoidMethod(env, o, mid_Issue17073_OnError, _err);
go_seq_pop_local_frame(env);
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_00024proxyNullTest_null_1(JNIEnv* env, jobject __this__) {
int32_t o = go_seq_to_refnum_go(env, __this__);
int32_t r0 = proxytestpkg_NullTest_Null(o);
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_NullTest, proxy_class_testpkg_NullTest_cons);
return _r0;
}
int32_t cproxytestpkg_NullTest_Null(int32_t refnum) {
JNIEnv *env = go_seq_push_local_frame(0);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_NullTest, proxy_class_testpkg_NullTest_cons);
jobject res = (*env)->CallObjectMethod(env, o, mid_NullTest_Null);
int32_t _res = go_seq_to_refnum(env, res);
go_seq_pop_local_frame(env);
return _res;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_00024proxyNummer_num(JNIEnv* env, jobject __this__) {
int32_t o = go_seq_to_refnum_go(env, __this__);
proxytestpkg_Nummer_Num(o);
}
void cproxytestpkg_Nummer_Num(int32_t refnum) {
JNIEnv *env = go_seq_push_local_frame(0);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_Nummer, proxy_class_testpkg_Nummer_cons);
(*env)->CallVoidMethod(env, o, mid_Nummer_Num);
go_seq_pop_local_frame(env);
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_00024proxyReceiver_hello(JNIEnv* env, jobject __this__, jstring message) {
int32_t o = go_seq_to_refnum_go(env, __this__);
nstring _message = go_seq_from_java_string(env, message);
proxytestpkg_Receiver_Hello(o, _message);
}
void cproxytestpkg_Receiver_Hello(int32_t refnum, nstring message) {
JNIEnv *env = go_seq_push_local_frame(1);
jobject o = go_seq_from_refnum(env, refnum, proxy_class_testpkg_Receiver, proxy_class_testpkg_Receiver_cons);
jstring _message = go_seq_to_java_string(env, message);
(*env)->CallVoidMethod(env, o, mid_Receiver_Hello, _message);
go_seq_pop_local_frame(env);
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_setGlobalErr(JNIEnv *env, jclass clazz, jobject v) {
int32_t _v = go_seq_to_refnum(env, v);
var_settestpkg_GlobalErr(_v);
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_getGlobalErr(JNIEnv *env, jclass clazz) {
int32_t r0 = var_gettestpkg_GlobalErr();
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class__error, proxy_class__error_cons);
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_setImportedVarI(JNIEnv *env, jclass clazz, TODO v) {
TODO _v = (TODO)v;
var_settestpkg_ImportedVarI(_v);
}
JNIEXPORT TODO JNICALL
Java_testpkg_Testpkg_getImportedVarI(JNIEnv *env, jclass clazz) {
TODO r0 = var_gettestpkg_ImportedVarI();
TODO _r0 = (TODO)r0;
return _r0;
}
// skipped variable ImportedVarS with unsupported type: *types.Pointer
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_setIntVar(JNIEnv *env, jclass clazz, jlong v) {
nint _v = (nint)v;
var_settestpkg_IntVar(_v);
}
JNIEXPORT jlong JNICALL
Java_testpkg_Testpkg_getIntVar(JNIEnv *env, jclass clazz) {
nint r0 = var_gettestpkg_IntVar();
jlong _r0 = (jlong)r0;
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_setInterfaceVar(JNIEnv *env, jclass clazz, jobject v) {
int32_t _v = go_seq_to_refnum(env, v);
var_settestpkg_InterfaceVar(_v);
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_getInterfaceVar(JNIEnv *env, jclass clazz) {
int32_t r0 = var_gettestpkg_InterfaceVar();
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_I, proxy_class_testpkg_I_cons);
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_setInterfaceVar2(JNIEnv *env, jclass clazz, jobject v) {
int32_t _v = go_seq_to_refnum(env, v);
var_settestpkg_InterfaceVar2(_v);
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_getInterfaceVar2(JNIEnv *env, jclass clazz) {
int32_t r0 = var_gettestpkg_InterfaceVar2();
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_I2, proxy_class_testpkg_I2_cons);
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_setNodeVar(JNIEnv *env, jclass clazz, jobject v) {
int32_t _v = go_seq_to_refnum(env, v);
var_settestpkg_NodeVar(_v);
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_getNodeVar(JNIEnv *env, jclass clazz) {
int32_t r0 = var_gettestpkg_NodeVar();
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_Node, proxy_class_testpkg_Node_cons);
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_setStringVar(JNIEnv *env, jclass clazz, jstring v) {
nstring _v = go_seq_from_java_string(env, v);
var_settestpkg_StringVar(_v);
}
JNIEXPORT jstring JNICALL
Java_testpkg_Testpkg_getStringVar(JNIEnv *env, jclass clazz) {
nstring r0 = var_gettestpkg_StringVar();
jstring _r0 = go_seq_to_java_string(env, r0);
return _r0;
}
JNIEXPORT void JNICALL
Java_testpkg_Testpkg_setStructVar(JNIEnv *env, jclass clazz, jobject v) {
int32_t _v = go_seq_to_refnum(env, v);
var_settestpkg_StructVar(_v);
}
JNIEXPORT jobject JNICALL
Java_testpkg_Testpkg_getStructVar(JNIEnv *env, jclass clazz) {
int32_t r0 = var_gettestpkg_StructVar();
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_testpkg_S, proxy_class_testpkg_S_cons);
return _r0;
}
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// JNI function headers for the Go <=> Java bridge.
// gobind -lang=java testpkg
//
// File is generated by gobind. Do not edit.
#ifndef __Testpkg_H__
#define __Testpkg_H__
#include <jni.h>
extern jclass proxy_class_testpkg_B;
extern jmethodID proxy_class_testpkg_B_cons;
void cproxytestpkg_B_B(int32_t refnum, nbyteslice b);
extern jclass proxy_class_testpkg_ConcreteDupper;
extern jmethodID proxy_class_testpkg_ConcreteDupper_cons;
int32_t cproxytestpkg_ConcreteDupper_CDup(int32_t refnum, int32_t c);
extern jclass proxy_class_testpkg_EmptyErrorer;
extern jmethodID proxy_class_testpkg_EmptyErrorer_cons;
int32_t cproxytestpkg_EmptyErrorer_EmptyError(int32_t refnum);
extern jclass proxy_class_testpkg_GoCallback;
extern jmethodID proxy_class_testpkg_GoCallback_cons;
void cproxytestpkg_GoCallback_VarUpdate(int32_t refnum);
extern jclass proxy_class_testpkg_I;
extern jmethodID proxy_class_testpkg_I_cons;
int32_t cproxytestpkg_I_E(int32_t refnum);
void cproxytestpkg_I_F(int32_t refnum);
int32_t cproxytestpkg_I_I(int32_t refnum);
int32_t cproxytestpkg_I_S(int32_t refnum);
nstring cproxytestpkg_I_StoString(int32_t refnum, int32_t seq);
nstring cproxytestpkg_I_String(int32_t refnum);
nint cproxytestpkg_I_V(int32_t refnum);
typedef struct cproxytestpkg_I_VE_return {
nint r0;
int32_t r1;
} cproxytestpkg_I_VE_return;
struct cproxytestpkg_I_VE_return cproxytestpkg_I_VE(int32_t refnum);
extern jclass proxy_class_testpkg_I2;
extern jmethodID proxy_class_testpkg_I2_cons;
int32_t cproxytestpkg_I2_Error(int32_t refnum, char triggerError);
typedef struct cproxytestpkg_I2_StringError_return {
nstring r0;
int32_t r1;
} cproxytestpkg_I2_StringError_return;
struct cproxytestpkg_I2_StringError_return cproxytestpkg_I2_StringError(int32_t refnum, nstring s);
int64_t cproxytestpkg_I2_Times(int32_t refnum, int32_t v);
extern jclass proxy_class_testpkg_ImportedI;
extern jmethodID proxy_class_testpkg_ImportedI_cons;
void cproxytestpkg_ImportedI_F(int32_t refnum, TODO p0);
extern jclass proxy_class_testpkg_Interface;
extern jmethodID proxy_class_testpkg_Interface_cons;
void cproxytestpkg_Interface_F(int32_t refnum);
extern jclass proxy_class_testpkg_InterfaceDupper;
extern jmethodID proxy_class_testpkg_InterfaceDupper_cons;
int32_t cproxytestpkg_InterfaceDupper_IDup(int32_t refnum, int32_t i);
extern jclass proxy_class_testpkg_Issue14168;
extern jmethodID proxy_class_testpkg_Issue14168_cons;
void cproxytestpkg_Issue14168_F(int32_t refnum, int32_t seq);
extern jclass proxy_class_testpkg_Issue17073;
extern jmethodID proxy_class_testpkg_Issue17073_cons;
void cproxytestpkg_Issue17073_OnError(int32_t refnum, int32_t err);
extern jclass proxy_class_testpkg_NullTest;
extern jmethodID proxy_class_testpkg_NullTest_cons;
int32_t cproxytestpkg_NullTest_Null(int32_t refnum);
extern jclass proxy_class_testpkg_Nummer;
extern jmethodID proxy_class_testpkg_Nummer_cons;
void cproxytestpkg_Nummer_Num(int32_t refnum);
extern jclass proxy_class_testpkg_Receiver;
extern jmethodID proxy_class_testpkg_Receiver_cons;
void cproxytestpkg_Receiver_Hello(int32_t refnum, nstring message);
extern jclass proxy_class_testpkg_AnSer;
extern jmethodID proxy_class_testpkg_AnSer_cons;
extern jclass proxy_class_testpkg_Concrete;
extern jmethodID proxy_class_testpkg_Concrete_cons;
extern jclass proxy_class_testpkg_ImportedFields;
extern jmethodID proxy_class_testpkg_ImportedFields_cons;
extern jclass proxy_class_testpkg_InitCaller;
extern jmethodID proxy_class_testpkg_InitCaller_cons;
extern jclass proxy_class_testpkg_Node;
extern jmethodID proxy_class_testpkg_Node_cons;
extern jclass proxy_class_testpkg_NullFieldStruct;
extern jmethodID proxy_class_testpkg_NullFieldStruct_cons;
extern jclass proxy_class_testpkg_S;
extern jmethodID proxy_class_testpkg_S_cons;
extern jclass proxy_class_testpkg_S2;
extern jmethodID proxy_class_testpkg_S2_cons;
extern jclass proxy_class_testpkg_S3;
extern jmethodID proxy_class_testpkg_S3_cons;
extern jclass proxy_class_testpkg_S4;
extern jmethodID proxy_class_testpkg_S4_cons;
#endif
// Java class go.Universe is a proxy for talking to a Go program.
// gobind -lang=java
//
// File is generated by gobind. Do not edit.
package go;
import go.Seq;
public abstract class Universe {
static {
Seq.touch(); // for loading the native library
_init();
}
private Universe() {} // uninstantiable
// touch is called from other bound packages to initialize this package
public static void touch() {}
private static native void _init();
private static final class proxyerror extends Exception implements Seq.Proxy, error {
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
proxyerror(Seq.Ref ref) { this.ref = ref; }
@Override public String getMessage() { return error(); }
public native String error();
}
}
// Java class go.error is a proxy for talking to a Go program.
// gobind -lang=java
//
// File is generated by gobind. Do not edit.
package go;
import go.Seq;
public interface error {
public String error();
}
// JNI functions for the Go <=> Java bridge.
// gobind -lang=java
//
// File is generated by gobind. Do not edit.
#include <android/log.h>
#include <stdint.h>
#include "seq.h"
#include "_cgo_export.h"
#include "universe.h"
jclass proxy_class__error;
jmethodID proxy_class__error_cons;
static jmethodID mid_error_Error;
JNIEXPORT void JNICALL
Java_go_Universe__1init(JNIEnv *env, jclass _unused) {
jclass clazz;
clazz = (*env)->FindClass(env, "go/Universe$proxyerror");
proxy_class__error = (*env)->NewGlobalRef(env, clazz);
proxy_class__error_cons = (*env)->GetMethodID(env, clazz, "<init>", "(Lgo/Seq$Ref;)V");
clazz = (*env)->FindClass(env, "java/lang/Throwable");
mid_error_Error = (*env)->GetMethodID(env, clazz, "getMessage", "()Ljava/lang/String;");
}
JNIEXPORT jstring JNICALL
Java_go_Universe_00024proxyerror_error(JNIEnv* env, jobject __this__) {
int32_t o = go_seq_to_refnum_go(env, __this__);
nstring r0 = proxy_error_Error(o);
jstring _r0 = go_seq_to_java_string(env, r0);
return _r0;
}
nstring cproxy_error_Error(int32_t refnum) {
JNIEnv *env = go_seq_push_local_frame(0);
jobject o = go_seq_from_refnum(env, refnum, proxy_class__error, proxy_class__error_cons);
jstring res = (*env)->CallObjectMethod(env, o, mid_error_Error);
nstring _res = go_seq_from_java_string(env, res);
go_seq_pop_local_frame(env);
return _res;
}
// JNI function headers for the Go <=> Java bridge.
// gobind -lang=java
//
// File is generated by gobind. Do not edit.
#ifndef __Universe_H__
#define __Universe_H__
#include <jni.h>
extern jclass proxy_class__error;
extern jmethodID proxy_class__error_cons;
nstring cproxy_error_Error(int32_t refnum);
#endif
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package go;
import java.util.Arrays;
import java.util.IdentityHashMap;
import java.util.logging.Logger;
import go.Universe;
// Seq is a sequence of machine-dependent encoded values.
// Used by automatically generated language bindings to talk to Go.
public class Seq {
private static Logger log = Logger.getLogger("GoSeq");
// also known to bind/seq/ref.go and bind/objc/seq_darwin.m
private static final int NULL_REFNUM = 41;
// use single Ref for null Object
public static final Ref nullRef = new Ref(NULL_REFNUM, null);
static {
// Look for the shim class auto-generated by gomobile bind.
// Its only purpose is to call System.loadLibrary.
try {
Class loadJNI = Class.forName("go.LoadJNI");
setContext(loadJNI.getDeclaredField("ctx").get(null));
} catch (ClassNotFoundException e) {
// Ignore, assume the user will load JNI for it.
log.warning("LoadJNI class not found");
} catch (NoSuchFieldException e) {
log.severe("LoadJNI class missing field: " + e);
} catch (IllegalAccessException e) {
log.severe("LoadJNI class bad field: " + e);
}
init();
Universe.touch();
}
private static native void init();
// Empty method to run class initializer
public static void touch() {}
private Seq() {
}
// ctx is an android.context.Context.
static native void setContext(java.lang.Object ctx);
public static void incRefnum(int refnum) {
tracker.incRefnum(refnum);
}
// incRef increments the reference count of Java objects.
// For proxies for Go objects, it calls into the Proxy method
// incRefnum() to make sure the Go reference count is positive
// even if the Proxy is garbage collected and its Ref is finalized.
public static int incRef(Object o) {
return tracker.inc(o);
}
public static int incGoObjectRef(GoObject o) {
return o.incRefnum();
}
public static Ref getRef(int refnum) {
return tracker.get(refnum);
}
// Increment the Go reference count before sending over a refnum.
public static native void incGoRef(int refnum);
// Informs the Go ref tracker that Java is done with this ref.
static native void destroyRef(int refnum);
// decRef is called from seq.FinalizeRef
static void decRef(int refnum) {
tracker.dec(refnum);
}
// A GoObject is a Java class implemented in Go. When a GoObject
// is passed to Go, it is wrapped in a Go proxy, to make it behave
// the same as passing a regular Java class.
public interface GoObject {
// Increment refcount and return the refnum of the proxy.
//
// The Go reference count need to be bumped while the
// refnum is passed to Go, to avoid finalizing and
// invalidating it before being translated on the Go side.
int incRefnum();
}
// A Proxy is a Java object that proxies a Go object. Proxies, unlike
// GoObjects, are unwrapped to their Go counterpart when deserialized
// in Go.
public interface Proxy extends GoObject {}
// A Ref is an object tagged with an integer for passing back and
// forth across the language boundary.
//
// A Ref may represent either an instance of a Java object,
// or an instance of a Go object. The explicit allocation of a Ref
// is used to pin Go object instances when they are passed to Java.
// The Go Seq library maintains a reference to the instance in a map
// keyed by the Ref number. When the JVM calls finalize, we ask Go
// to clear the entry in the map.
public static final class Ref {
// refnum < 0: Go object tracked by Java
// refnum > 0: Java object tracked by Go
public final int refnum;
private int refcnt; // for Java obj: track how many times sent to Go.
public final Object obj; // for Java obj: pointers to the Java obj.
Ref(int refnum, Object o) {
this.refnum = refnum;
this.refcnt = 0;
this.obj = o;
}
@Override
protected void finalize() throws Throwable {
if (refnum < 0) {
// Go object: signal Go to decrement the reference count.
Seq.destroyRef(refnum);
}
super.finalize();
}
void inc() {
// Count how many times this ref's Java object is passed to Go.
if (refcnt == Integer.MAX_VALUE) {
throw new RuntimeException("refnum " + refnum + " overflow");
}
refcnt++;
}
}
static final RefTracker tracker = new RefTracker();
static final class RefTracker {
private static final int REF_OFFSET = 42;
// Next Java object reference number.
//
// Reference numbers are positive for Java objects,
// and start, arbitrarily at a different offset to Go
// to make debugging by reading Seq hex a little easier.
private int next = REF_OFFSET; // next Java object ref
// Java objects that have been passed to Go. refnum -> Ref
// The Ref obj field is non-null.
// This map pins Java objects so they don't get GCed while the
// only reference to them is held by Go code.
private final RefMap javaObjs = new RefMap();
// Java objects to refnum
private final IdentityHashMap<Object, Integer> javaRefs = new IdentityHashMap<>();
// inc increments the reference count of a Java object when it
// is sent to Go. inc returns the refnum for the object.
synchronized int inc(Object o) {
if (o == null) {
return NULL_REFNUM;
}
if (o instanceof Proxy) {
return ((Proxy)o).incRefnum();
}
Integer refnumObj = javaRefs.get(o);
if (refnumObj == null) {
if (next == Integer.MAX_VALUE) {
throw new RuntimeException("createRef overflow for " + o);
}
refnumObj = next++;
javaRefs.put(o, refnumObj);
}
int refnum = refnumObj;
Ref ref = javaObjs.get(refnum);
if (ref == null) {
ref = new Ref(refnum, o);
javaObjs.put(refnum, ref);
}
ref.inc();
return refnum;
}
synchronized void incRefnum(int refnum) {
Ref ref = javaObjs.get(refnum);
if (ref == null) {
throw new RuntimeException("referenced Java object is not found: refnum="+refnum);
}
ref.inc();
}
// dec decrements the reference count of a Java object when
// Go signals a corresponding proxy object is finalized.
// If the count reaches zero, the Java object is removed
// from the javaObjs map.
synchronized void dec(int refnum) {
if (refnum <= 0) {
// We don't keep track of the Go object.
// This must not happen.
log.severe("dec request for Go object "+ refnum);
return;
}
if (refnum == Seq.nullRef.refnum) {
return;
}
// Java objects are removed on request of Go.
Ref obj = javaObjs.get(refnum);
if (obj == null) {
throw new RuntimeException("referenced Java object is not found: refnum="+refnum);
}
obj.refcnt--;
if (obj.refcnt <= 0) {
javaObjs.remove(refnum);
javaRefs.remove(obj.obj);
}
}
// get returns an existing Ref to either a Java or Go object.
// It may be the first time we have seen the Go object.
//
// TODO(crawshaw): We could cut down allocations for frequently
// sent Go objects by maintaining a map to weak references. This
// however, would require allocating two objects per reference
// instead of one. It also introduces weak references, the bane
// of any Java debugging session.
//
// When we have real code, examine the tradeoffs.
synchronized Ref get(int refnum) {
if (refnum == NULL_REFNUM) {
return nullRef;
} else if (refnum > 0) {
Ref ref = javaObjs.get(refnum);
if (ref == null) {
throw new RuntimeException("unknown java Ref: "+refnum);
}
return ref;
} else {
// Go object.
return new Ref(refnum, null);
}
}
}
// RefMap is a mapping of integers to Ref objects.
//
// The integers can be sparse. In Go this would be a map[int]*Ref.
static final class RefMap {
private int next = 0;
private int live = 0;
private int[] keys = new int[16];
private Ref[] objs = new Ref[16];
RefMap() {}
Ref get(int key) {
int i = Arrays.binarySearch(keys, 0, next, key);
if (i >= 0) {
return objs[i];
}
return null;
}
void remove(int key) {
int i = Arrays.binarySearch(keys, 0, next, key);
if (i >= 0) {
if (objs[i] != null) {
objs[i] = null;
live--;
}
}
}
void put(int key, Ref obj) {
if (obj == null) {
throw new RuntimeException("put a null ref (with key "+key+")");
}
int i = Arrays.binarySearch(keys, 0, next, key);
if (i >= 0) {
if (objs[i] == null) {
objs[i] = obj;
live++;
}
if (objs[i] != obj) {
throw new RuntimeException("replacing an existing ref (with key "+key+")");
}
return;
}
if (next >= keys.length) {
grow();
i = Arrays.binarySearch(keys, 0, next, key);
}
i = ~i;
if (i < next) {
// Insert, shift everything afterwards down.
System.arraycopy(keys, i, keys, i+1, next-i);
System.arraycopy(objs, i, objs, i+1, next-i);
}
keys[i] = key;
objs[i] = obj;
live++;
next++;
}
private void grow() {
// Compact and (if necessary) grow backing store.
int[] newKeys;
Ref[] newObjs;
int len = 2*roundPow2(live);
if (len > keys.length) {
newKeys = new int[keys.length*2];
newObjs = new Ref[objs.length*2];
} else {
newKeys = keys;
newObjs = objs;
}
int j = 0;
for (int i = 0; i < keys.length; i++) {
if (objs[i] != null) {
newKeys[j] = keys[i];
newObjs[j] = objs[i];
j++;
}
}
for (int i = j; i < newKeys.length; i++) {
newKeys[i] = 0;
newObjs[i] = null;
}
keys = newKeys;
objs = newObjs;
next = j;
if (live != next) {
throw new RuntimeException("bad state: live="+live+", next="+next);
}
}
private static int roundPow2(int x) {
int p = 1;
while (p < x) {
p *= 2;
}
return p;
}
}
}
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package go;
import android.app.Application;
import android.content.Context;
import java.util.logging.Logger;
// LoadJNI is a shim class used by 'gomobile bind' to auto-load the
// compiled go library and pass the android application context to
// Go side.
//
// TODO(hyangah): should this be in cmd/gomobile directory?
public class LoadJNI {
private static Logger log = Logger.getLogger("GoLoadJNI");
public static final Object ctx;
static {
System.loadLibrary("gojni");
Object androidCtx = null;
try {
// TODO(hyangah): check proguard rule.
Application appl = (Application)Class.forName("android.app.AppGlobals").getMethod("getInitialApplication").invoke(null);
androidCtx = appl.getApplicationContext();
} catch (Exception e) {
log.warning("Global context not found: " + e);
} finally {
ctx = androidCtx;
}
}
}
--- FAIL: TestGobind/Go-Testpkg (0.03s)
gobind_test.go:52: gobind -lang go golang.org/x/mobile/bind/testpkg failed: exit status 1: unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
unsupported basic type: invalid type
// Package gomobile_bind is an autogenerated binder stub for package universe.
// gobind -lang=go
//
// File is generated by gobind. Do not edit.
package gomobile_bind
/*
#include <stdlib.h>
#include <stdint.h>
#include "seq.h"
#include "universe.h"
*/
import "C"
import (
_seq "golang.org/x/mobile/bind/seq"
)
// suppress the error if seq ends up unused
var _ = _seq.FromRefNum
//export proxy_error_Error
func proxy_error_Error(refnum C.int32_t) C.nstring {
ref := _seq.FromRefNum(int32(refnum))
v := ref.Get().(error)
res_0 := v.Error()
_res_0 := encodeString(res_0)
return _res_0
}
type proxy_error _seq.Ref
func (p *proxy_error) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
func (p *proxy_error) Error() string {
res := C.cproxy_error_Error(C.int32_t(p.Bind_proxy_refnum__()))
_res := decodeString(res)
return _res
}
FAIL
FAIL golang.org/x/mobile/cmd/gobind 32.657s
--- FAIL: TestInit (1.97s)
init_test.go:56: unexpected output:
--- /var/folders/vc/m6yk82d554qdyq5d17q4f86m0000gn/T/gofmt356847134 2017-02-21 19:45:02.000000000 +0100
+++ /var/folders/vc/m6yk82d554qdyq5d17q4f86m0000gn/T/gofmt106025189 2017-02-21 19:45:02.000000000 +0100
@@ -12,29 +12,5 @@
GOOS=darwin GOARCH=arm GOARM=7 CC=clang-iphoneos CXX=clang-iphoneos CGO_CFLAGS=-isysroot=iphoneos -miphoneos-version-min=6.1 -arch armv7 CGO_LDFLAGS=-isysroot=iphoneos -miphoneos-version-min=6.1 -arch armv7 CGO_ENABLED=1 go install -pkgdir=$GOMOBILE/pkg_darwin_arm -x std
GOOS=darwin GOARCH=arm64 CC=clang-iphoneos CXX=clang-iphoneos CGO_CFLAGS=-isysroot=iphoneos -miphoneos-version-min=6.1 -arch arm64 CGO_LDFLAGS=-isysroot=iphoneos -miphoneos-version-min=6.1 -arch arm64 CGO_ENABLED=1 go install -pkgdir=$GOMOBILE/pkg_darwin_arm64 -x std
GOOS=darwin GOARCH=amd64 CC=clang-iphonesimulator CXX=clang-iphonesimulator CGO_CFLAGS=-isysroot=iphonesimulator -mios-simulator-version-min=6.1 -arch x86_64 CGO_LDFLAGS=-isysroot=iphonesimulator -mios-simulator-version-min=6.1 -arch x86_64 CGO_ENABLED=1 go install -tags=ios -pkgdir=$GOMOBILE/pkg_darwin_amd64 -x std
-cp $OPENAL_PATH/include/AL/al.h $GOMOBILE/include/AL/al.h
-mkdir -p $GOMOBILE/include/AL
-cp $OPENAL_PATH/include/AL/alc.h $GOMOBILE/include/AL/alc.h
-mkdir -p $GOMOBILE/include/AL
-PWD=$NDK_PATH $NDK_PATH/prebuilt/darwin-x86_64/bin/python2.7 build/tools/make_standalone_toolchain.py --arch=arm --api=15 --install-dir=$WORK/build/armeabi/toolchain
-PWD=$WORK/build/armeabi cmake $OPENAL_PATH -DCMAKE_TOOLCHAIN_FILE=$OPENAL_PATH/XCompile-Android.txt -DHOST=arm-linux-androideabi
-PWD=$WORK/build/armeabi $NDK_PATH/prebuilt/darwin-x86_64/bin/make
-cp $WORK/build/armeabi/libopenal.so $GOMOBILE/lib/armeabi-v7a/libopenal.so
-mkdir -p $GOMOBILE/lib/armeabi-v7a
-PWD=$NDK_PATH $NDK_PATH/prebuilt/darwin-x86_64/bin/python2.7 build/tools/make_standalone_toolchain.py --arch=arm64 --api=21 --install-dir=$WORK/build/arm64/toolchain
-PWD=$WORK/build/arm64 cmake $OPENAL_PATH -DCMAKE_TOOLCHAIN_FILE=$OPENAL_PATH/XCompile-Android.txt -DHOST=aarch64-linux-android
-PWD=$WORK/build/arm64 $NDK_PATH/prebuilt/darwin-x86_64/bin/make
-cp $WORK/build/arm64/libopenal.so $GOMOBILE/lib/arm64-v8a/libopenal.so
-mkdir -p $GOMOBILE/lib/arm64-v8a
-PWD=$NDK_PATH $NDK_PATH/prebuilt/darwin-x86_64/bin/python2.7 build/tools/make_standalone_toolchain.py --arch=x86 --api=15 --install-dir=$WORK/build/x86/toolchain
-PWD=$WORK/build/x86 cmake $OPENAL_PATH -DCMAKE_TOOLCHAIN_FILE=$OPENAL_PATH/XCompile-Android.txt -DHOST=i686-linux-android
-PWD=$WORK/build/x86 $NDK_PATH/prebuilt/darwin-x86_64/bin/make
-cp $WORK/build/x86/libopenal.so $GOMOBILE/lib/x86/libopenal.so
-mkdir -p $GOMOBILE/lib/x86
-PWD=$NDK_PATH $NDK_PATH/prebuilt/darwin-x86_64/bin/python2.7 build/tools/make_standalone_toolchain.py --arch=x86_64 --api=21 --install-dir=$WORK/build/x86_64/toolchain
-PWD=$WORK/build/x86_64 cmake $OPENAL_PATH -DCMAKE_TOOLCHAIN_FILE=$OPENAL_PATH/XCompile-Android.txt -DHOST=x86_64-linux-android
-PWD=$WORK/build/x86_64 $NDK_PATH/prebuilt/darwin-x86_64/bin/make
-cp $WORK/build/x86_64/libopenal.so $GOMOBILE/lib/x86_64/libopenal.so
-mkdir -p $GOMOBILE/lib/x86_64
go version > $GOMOBILE/version
rm -r -f "$WORK"
FAIL
FAIL golang.org/x/mobile/cmd/gomobile 4.221s
? golang.org/x/mobile/event/key [no test files]
? golang.org/x/mobile/event/lifecycle [no test files]
? golang.org/x/mobile/event/mouse [no test files]
? golang.org/x/mobile/event/paint [no test files]
? golang.org/x/mobile/event/size [no test files]
? golang.org/x/mobile/event/touch [no test files]
? golang.org/x/mobile/example/basic [no test files]
? golang.org/x/mobile/example/bind/hello [no test files]
? golang.org/x/mobile/example/flappy [no test files]
? golang.org/x/mobile/example/network [no test files]
? golang.org/x/mobile/exp/app/debug [no test files]
? golang.org/x/mobile/exp/audio/al [no test files]
ok golang.org/x/mobile/exp/f32 0.010s
ok golang.org/x/mobile/exp/font 0.046s
FAIL golang.org/x/mobile/exp/gl/glutil [build failed]
? golang.org/x/mobile/exp/sensor [no test files]
? golang.org/x/mobile/exp/sprite [no test files]
ok golang.org/x/mobile/exp/sprite/clock 0.011s
? golang.org/x/mobile/exp/sprite/glsprite [no test files]
ok golang.org/x/mobile/exp/sprite/portable 0.020s
? golang.org/x/mobile/geom [no test files]
? golang.org/x/mobile/gl [no test files]
ok golang.org/x/mobile/internal/binres 0.024s
ok golang.org/x/mobile/internal/importers 0.012s
ok golang.org/x/mobile/internal/importers/java 1.913s
--- FAIL: TestImport (0.03s)
objc_test.go:59: Hash: clang failed to parse module: exit status 1
FAIL
FAIL golang.org/x/mobile/internal/importers/objc 0.037s
? golang.org/x/mobile/internal/mobileinit [no test files]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment