github.com/F4RD1N/gomobile@v1.0.1/bind/testdata/issue12328.objc.m.golden (about) 1 // Objective-C API for talking to issue12328 Go package. 2 // gobind -lang=objc issue12328 3 // 4 // File is generated by gobind. Do not edit. 5 6 #include <Foundation/Foundation.h> 7 #include "seq.h" 8 #include "_cgo_export.h" 9 #include "Issue12328.objc.h" 10 11 12 @implementation Issue12328T { 13 } 14 15 - (nonnull instancetype)initWithRef:(_Nonnull id)ref { 16 self = [super init]; 17 if (self) { __ref = ref; } 18 return self; 19 } 20 21 - (nonnull instancetype)init { 22 self = [super init]; 23 if (self) { 24 __ref = go_seq_from_refnum(new_issue12328_T()); 25 } 26 return self; 27 } 28 29 - (NSError* _Nullable)err { 30 int32_t refnum = go_seq_go_to_refnum(self._ref); 31 int32_t r0 = proxyissue12328_T_Err_Get(refnum); 32 Universeerror* _r0 = nil; 33 GoSeqRef* _r0_ref = go_seq_from_refnum(r0); 34 if (_r0_ref != NULL) { 35 _r0 = _r0_ref.obj; 36 if (_r0 == nil) { 37 _r0 = [[Universeerror alloc] initWithRef:_r0_ref]; 38 } 39 } 40 return _r0; 41 } 42 43 - (void)setErr:(NSError* _Nullable)v { 44 int32_t refnum = go_seq_go_to_refnum(self._ref); 45 int32_t _v; 46 if ([v conformsToProtocol:@protocol(goSeqRefInterface)]) { 47 id<goSeqRefInterface> v_proxy = (id<goSeqRefInterface>)(v); 48 _v = go_seq_go_to_refnum(v_proxy._ref); 49 } else { 50 _v = go_seq_to_refnum(v); 51 } 52 proxyissue12328_T_Err_Set(refnum, _v); 53 } 54 55 @end 56 57 58 59 __attribute__((constructor)) static void init() { 60 init_seq(); 61 }