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>
67 lines
1.4 KiB
Plaintext
67 lines
1.4 KiB
Plaintext
// Objective-C API for talking to underscores Go package.
|
|
// gobind -lang=objc underscores
|
|
//
|
|
// File is generated by gobind. Do not edit.
|
|
|
|
#include <Foundation/Foundation.h>
|
|
#include "seq.h"
|
|
#include "_cgo_export.h"
|
|
#include "Underscore_pkg.objc.h"
|
|
|
|
|
|
@implementation Underscore_pkgUnderscore_struct {
|
|
}
|
|
|
|
- (nonnull instancetype)initWithRef:(_Nonnull id)ref {
|
|
self = [super init];
|
|
if (self) { __ref = ref; }
|
|
return self;
|
|
}
|
|
|
|
- (nonnull instancetype)init {
|
|
self = [super init];
|
|
if (self) {
|
|
__ref = go_seq_from_refnum(new_underscore_pkg_Underscore_struct());
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (NSString* _Nonnull)underscore_field {
|
|
int32_t refnum = go_seq_go_to_refnum(self._ref);
|
|
nstring r0 = proxyunderscore_pkg_Underscore_struct_Underscore_field_Get(refnum);
|
|
NSString *_r0 = go_seq_to_objc_string(r0);
|
|
return _r0;
|
|
}
|
|
|
|
- (void)setUnderscore_field:(NSString* _Nonnull)v {
|
|
int32_t refnum = go_seq_go_to_refnum(self._ref);
|
|
nstring _v = go_seq_from_objc_string(v);
|
|
proxyunderscore_pkg_Underscore_struct_Underscore_field_Set(refnum, _v);
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
@implementation Underscore_pkg
|
|
+ (void) setUnderscore_var:(long)v {
|
|
nint _v = (nint)v;
|
|
var_setunderscore_pkg_Underscore_var(_v);
|
|
}
|
|
|
|
+ (long) underscore_var {
|
|
nint r0 = var_getunderscore_pkg_Underscore_var();
|
|
long _r0 = (long)r0;
|
|
return _r0;
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
void Underscore_pkgUnderscore_func(void) {
|
|
proxyunderscore_pkg__Underscore_func();
|
|
}
|
|
|
|
__attribute__((constructor)) static void init() {
|
|
init_seq();
|
|
}
|