| // Objective-C API for talking to aliases Go package. |
| // gobind -lang=objc aliases |
| // |
| // File is generated by gobind. Do not edit. |
| |
| #include <Foundation/Foundation.h> |
| #include "seq.h" |
| #include "_cgo_export.h" |
| #include "Aliases.objc.h" |
| |
| |
| @implementation AliasesS { |
| } |
| |
| - (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_aliases_S()); |
| } |
| return self; |
| } |
| |
| @end |
| |
| |
| |
| void AliasesTakesAByte(byte a) { |
| uint8_t _a = (uint8_t)a; |
| proxyaliases__TakesAByte(_a); |
| } |
| |
| void AliasesTakesAByteSlice(NSData* _Nullable a) { |
| nbyteslice _a = go_seq_from_objc_bytearray(a, 0); |
| proxyaliases__TakesAByteSlice(_a); |
| if (![a isKindOfClass:[NSMutableData class]]) { |
| free(_a.ptr); |
| } |
| } |
| |
| void AliasesTakesAByteSliceAlias(NSData* _Nullable a) { |
| nbyteslice _a = go_seq_from_objc_bytearray(a, 0); |
| proxyaliases__TakesAByteSliceAlias(_a); |
| if (![a isKindOfClass:[NSMutableData class]]) { |
| free(_a.ptr); |
| } |
| } |
| |
| void AliasesTakesAStructPtr(AliasesS* _Nullable a) { |
| int32_t _a; |
| if ([a conformsToProtocol:@protocol(goSeqRefInterface)]) { |
| id<goSeqRefInterface> a_proxy = (id<goSeqRefInterface>)(a); |
| _a = go_seq_go_to_refnum(a_proxy._ref); |
| } else { |
| _a = go_seq_to_refnum(a); |
| } |
| proxyaliases__TakesAStructPtr(_a); |
| } |
| |
| void AliasesTakesAStructPtrAlias(AliasesS* _Nullable a) { |
| int32_t _a; |
| if ([a conformsToProtocol:@protocol(goSeqRefInterface)]) { |
| id<goSeqRefInterface> a_proxy = (id<goSeqRefInterface>)(a); |
| _a = go_seq_go_to_refnum(a_proxy._ref); |
| } else { |
| _a = go_seq_to_refnum(a); |
| } |
| proxyaliases__TakesAStructPtrAlias(_a); |
| } |
| |
| __attribute__((constructor)) static void init() { |
| init_seq(); |
| } |