Also, fixes the memory allocation bug - misuse of mem_ensure that caused to allocate 72 bytes of memory to carry 16 bytes of data for instance. Fixes golang/go#11842. Change-Id: I21798be2ec7adfb68cc2897bb46a924f05f3478c Reviewed-on: https://go-review.googlesource.com/12577 Reviewed-by: David Crawshaw <crawshaw@golang.org>
45 lines
1.1 KiB
Objective-C
45 lines
1.1 KiB
Objective-C
// Objective-C API for talking to golang.org/x/mobile/bind/objc/testpkg Go package.
|
|
// gobind -lang=objc golang.org/x/mobile/bind/objc/testpkg
|
|
//
|
|
// File is generated by gobind. Do not edit.
|
|
|
|
#ifndef __GoTestpkg_H__
|
|
#define __GoTestpkg_H__
|
|
|
|
#include <Foundation/Foundation.h>
|
|
|
|
@class GoTestpkgS;
|
|
|
|
@interface GoTestpkgS : NSObject {
|
|
}
|
|
@property(strong, readonly) id ref;
|
|
|
|
- (id)initWithRef:(id)ref;
|
|
- (double)X;
|
|
- (void)setX:(double)v;
|
|
- (double)Y;
|
|
- (void)setY:(double)v;
|
|
- (double)Sum;
|
|
- (NSString*)TryTwoStrings:(NSString*)first second:(NSString*)second;
|
|
@end
|
|
|
|
FOUNDATION_EXPORT NSData* GoTestpkgBytesAppend(NSData* a, NSData* b);
|
|
|
|
FOUNDATION_EXPORT double GoTestpkgCallSSum(GoTestpkgS* s);
|
|
|
|
FOUNDATION_EXPORT int GoTestpkgCollectS(int want, int timeoutSec);
|
|
|
|
FOUNDATION_EXPORT NSString* GoTestpkgHello(NSString* s);
|
|
|
|
FOUNDATION_EXPORT void GoTestpkgHi();
|
|
|
|
FOUNDATION_EXPORT void GoTestpkgInt(int32_t x);
|
|
|
|
FOUNDATION_EXPORT GoTestpkgS* GoTestpkgNewS(double x, double y);
|
|
|
|
FOUNDATION_EXPORT BOOL GoTestpkgReturnsError(BOOL b, NSString** ret0_, NSError** error);
|
|
|
|
FOUNDATION_EXPORT int64_t GoTestpkgSum(int64_t x, int64_t y);
|
|
|
|
#endif
|