This highly improves interop with Swift. It would map all pointers as implicitly unwrapped optionals, which skip all null safety checks. Adding `_Nullable` to pointer types makes swift map them as optionals. Also constructors are now nullable since it's valid to return nil from Go code. Change-Id: If0506bb80f31bf36f11522c16a1e66d77be935f8 GitHub-Last-Rev: bd6c30f7f50ef5ea5797b07073f0a4a70d545025 GitHub-Pull-Request: golang/mobile#26 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/159477 Run-TryBot: Elias Naur <mail@eliasnaur.com> Reviewed-by: Elias Naur <mail@eliasnaur.com>
33 lines
991 B
Plaintext
33 lines
991 B
Plaintext
// Objective-C API for talking to basictypes Go package.
|
|
// gobind -lang=objc basictypes
|
|
//
|
|
// File is generated by gobind. Do not edit.
|
|
|
|
#ifndef __Basictypes_H__
|
|
#define __Basictypes_H__
|
|
|
|
@import Foundation;
|
|
#include "ref.h"
|
|
#include "Universe.objc.h"
|
|
|
|
|
|
FOUNDATION_EXPORT const BOOL BasictypesABool;
|
|
FOUNDATION_EXPORT const double BasictypesAFloat;
|
|
FOUNDATION_EXPORT NSString* const BasictypesALongString;
|
|
FOUNDATION_EXPORT const int32_t BasictypesARune;
|
|
FOUNDATION_EXPORT NSString* const BasictypesAString;
|
|
FOUNDATION_EXPORT const int64_t BasictypesAnInt;
|
|
FOUNDATION_EXPORT const int64_t BasictypesAnInt2;
|
|
|
|
FOUNDATION_EXPORT BOOL BasictypesBool(BOOL p0);
|
|
|
|
FOUNDATION_EXPORT NSData* _Nullable BasictypesByteArrays(NSData* _Nullable x);
|
|
|
|
FOUNDATION_EXPORT BOOL BasictypesError(NSError* _Nullable* error);
|
|
|
|
FOUNDATION_EXPORT BOOL BasictypesErrorPair(long* ret0_, NSError* _Nullable* error);
|
|
|
|
FOUNDATION_EXPORT void BasictypesInts(int8_t x, int16_t y, int32_t z, int64_t t, long u);
|
|
|
|
#endif
|