From Xcode 10.2 onwards, these annotations are required in all interface declarations. The behaviour can be disabled, but since we were already annotated most types it made sense to just annotate the rest. Change-Id: Iacd09a2fea4dfb3e22fec97cf4ca22966fc783bf GitHub-Last-Rev: a431572a83ea8b29f55813bcdafc9a00f8d15972 GitHub-Pull-Request: golang/mobile#29 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/171957 Reviewed-by: Elias Naur <mail@eliasnaur.com>
46 lines
969 B
Plaintext
46 lines
969 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 {
|
|
}
|
|
|
|
- (nonnull instancetype)initWithRef:(id)ref {
|
|
if (self) {
|
|
__ref = ref;
|
|
self = [super initWithDomain:@"go" code:1 userInfo:@{NSLocalizedDescriptionKey: [self error]}];
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (NSString* _Nonnull)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* _Nonnull ret0_;
|
|
ret0_ = [o localizedDescription];
|
|
nstring _ret0_ = go_seq_from_objc_string(ret0_);
|
|
return _ret0_;
|
|
}
|
|
}
|
|
|
|
__attribute__((constructor)) static void init() {
|
|
init_seq();
|
|
}
|