File: basictypes.objc.m.golden

package info (click to toggle)
golang-golang-x-mobile 0.0~git20250520.a1d9079%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,784 kB
  • sloc: objc: 1,512; java: 1,489; ansic: 1,159; xml: 365; asm: 34; sh: 14; makefile: 5
file content (82 lines) | stat: -rw-r--r-- 2,825 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// Objective-C API for talking to basictypes Go package.
//   gobind -lang=objc basictypes
//
// File is generated by gobind. Do not edit.

#include <Foundation/Foundation.h>
#include "seq.h"
#include "_cgo_export.h"
#include "Basictypes.objc.h"

const BOOL BasictypesABool = YES;
const double BasictypesAFloat = 0.2015;
NSString* const BasictypesALongString = @"LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString,LongString";
const int32_t BasictypesARune = 32;
NSString* const BasictypesAString = @"a string";
const int64_t BasictypesAnInt = 7LL;
const int64_t BasictypesAnInt2 = 9223372036854775807LL;


BOOL BasictypesBool(BOOL p0) {
	char _p0 = (char)p0;
	char r0 = proxybasictypes__Bool(_p0);
	BOOL _ret0_ = r0 ? YES : NO;
	return _ret0_;
}

NSData* _Nullable BasictypesByteArrays(NSData* _Nullable x) {
	nbyteslice _x = go_seq_from_objc_bytearray(x, 0);
	nbyteslice r0 = proxybasictypes__ByteArrays(_x);
	if (![x isKindOfClass:[NSMutableData class]]) {
	  free(_x.ptr);
	}
	NSData *_ret0_ = go_seq_to_objc_bytearray(r0, 1);
	return _ret0_;
}

BOOL BasictypesError(NSError* _Nullable* _Nullable error) {
	int32_t r0 = proxybasictypes__Error();
	Universeerror* _error = nil;
	GoSeqRef* _error_ref = go_seq_from_refnum(r0);
	if (_error_ref != NULL) {
		_error = _error_ref.obj;
		if (_error == nil) {
			_error = [[Universeerror alloc] initWithRef:_error_ref];
		}
	}
	if (_error != nil && error != nil) {
		*error = _error;
	}
	return (_error == nil);
}

BOOL BasictypesErrorPair(long* _Nullable ret0_, NSError* _Nullable* _Nullable error) {
	struct proxybasictypes__ErrorPair_return res = proxybasictypes__ErrorPair();
	long _ret0_ = (long)res.r0;
	Universeerror* _error = nil;
	GoSeqRef* _error_ref = go_seq_from_refnum(res.r1);
	if (_error_ref != NULL) {
		_error = _error_ref.obj;
		if (_error == nil) {
			_error = [[Universeerror alloc] initWithRef:_error_ref];
		}
	}
	*ret0_ = _ret0_;
	if (_error != nil && error != nil) {
		*error = _error;
	}
	return (_error == nil);
}

void BasictypesInts(int8_t x, int16_t y, int32_t z, int64_t t, long u) {
	int8_t _x = (int8_t)x;
	int16_t _y = (int16_t)y;
	int32_t _z = (int32_t)z;
	int64_t _t = (int64_t)t;
	nint _u = (nint)u;
	proxybasictypes__Ints(_x, _y, _z, _t, _u);
}

__attribute__((constructor)) static void init() {
	init_seq();
}