| 1 |
// Objective-C API for talking to underscores Go package. |
| 2 |
// gobind -lang=objc underscores |
| 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 "Underscore_pkg.objc.h" |
| 10 |
|
| 11 |
|
| 12 |
@implementation Underscore_pkgUnderscore_struct { |
| 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_underscore_pkg_Underscore_struct()); |
| 25 |
} |
| 26 |
return self; |
| 27 |
} |
| 28 |
|
| 29 |
- (NSString* _Nonnull)underscore_field { |
| 30 |
int32_t refnum = go_seq_go_to_refnum(self._ref); |
| 31 |
nstring r0 = proxyunderscore_pkg_Underscore_struct_Underscore_field_Get(refnum); |
| 32 |
NSString *_r0 = go_seq_to_objc_string(r0); |
| 33 |
return _r0; |
| 34 |
} |
| 35 |
|
| 36 |
- (void)setUnderscore_field:(NSString* _Nonnull)v { |
| 37 |
int32_t refnum = go_seq_go_to_refnum(self._ref); |
| 38 |
nstring _v = go_seq_from_objc_string(v); |
| 39 |
proxyunderscore_pkg_Underscore_struct_Underscore_field_Set(refnum, _v); |
| 40 |
} |
| 41 |
|
| 42 |
@end |
| 43 |
|
| 44 |
|
| 45 |
@implementation Underscore_pkg |
| 46 |
+ (void) setUnderscore_var:(long)v { |
| 47 |
nint _v = (nint)v; |
| 48 |
var_setunderscore_pkg_Underscore_var(_v); |
| 49 |
} |
| 50 |
|
| 51 |
+ (long) underscore_var { |
| 52 |
nint r0 = var_getunderscore_pkg_Underscore_var(); |
| 53 |
long _r0 = (long)r0; |
| 54 |
return _r0; |
| 55 |
} |
| 56 |
|
| 57 |
@end |
| 58 |
|
| 59 |
|
| 60 |
void Underscore_pkgUnderscore_func(void) { |
| 61 |
proxyunderscore_pkg__Underscore_func(); |
| 62 |
} |
| 63 |
|
| 64 |
__attribute__((constructor)) static void init() { |
| 65 |
init_seq(); |
| 66 |
} |