2
0
mirror of synced 2025-02-23 14:58:12 +00:00
mobile/bind/testdata/universe.objc.m.golden
Elias Naur 2802a0168e bind: include all generated code in tests
The tests was missing the generated code for the universe package
and some parts of the reverse generated code. Include it.

Change-Id: Id5e2f215c8f6f717c30377965255c4b64f31e923
Reviewed-on: https://go-review.googlesource.com/34992
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2017-01-12 22:17:26 +00:00

46 lines
943 B
Plaintext

// 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();
}