Fixes golang/go#18536 Change-Id: I82c5993547e4d1d0df14726ccc569e1f57128072 Reviewed-on: https://go-review.googlesource.com/101156 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.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 {
|
|
}
|
|
|
|
- (instancetype)initWithRef:(id)ref {
|
|
self = [super init];
|
|
if (self) { __ref = ref; }
|
|
return self;
|
|
}
|
|
|
|
- (instancetype)init {
|
|
self = [super init];
|
|
if (self) {
|
|
__ref = go_seq_from_refnum(new_underscore_pkg_Underscore_struct());
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (NSString*)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*)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();
|
|
}
|