bind/objc: Remove reference of seq.h from generated header file.
This allows gomobile bind to stop copying seq.h to the destination. Change-Id: I4a23613fe0407500ad483ae9d8f6bb823d82f082 Reviewed-on: https://go-review.googlesource.com/12300 Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
b43065626f
commit
6fb2670129
@ -68,7 +68,7 @@ func (g *objcGen) genH() error {
|
||||
g.Printf("#ifndef __Go%s_H__\n", capitalize(g.pkgName))
|
||||
g.Printf("#define __Go%s_H__\n", capitalize(g.pkgName))
|
||||
g.Printf("\n")
|
||||
g.Printf(`#include "seq.h"`)
|
||||
g.Printf(`#include <Foundation/Foundation.h>`)
|
||||
g.Printf("\n\n")
|
||||
|
||||
// @class names
|
||||
@ -375,9 +375,9 @@ func (g *objcGen) genInterfaceM(obj *types.TypeName, t *types.Interface) {
|
||||
func (g *objcGen) genStructH(obj *types.TypeName, t *types.Struct) {
|
||||
g.Printf("@interface %s%s : NSObject {\n", g.namePrefix, obj.Name())
|
||||
g.Printf("}\n")
|
||||
g.Printf("@property(strong, readonly) GoSeqRef *ref;\n")
|
||||
g.Printf("@property(strong, readonly) id ref;\n")
|
||||
g.Printf("\n")
|
||||
g.Printf("- (id)initWithRef:(GoSeqRef*)ref;\n")
|
||||
g.Printf("- (id)initWithRef:(id)ref;\n")
|
||||
|
||||
// accessors to exported fields.
|
||||
for _, f := range exportedFields(t) {
|
||||
@ -412,7 +412,7 @@ func (g *objcGen) genStructM(obj *types.TypeName, t *types.Struct) {
|
||||
g.Printf("\n")
|
||||
g.Printf("@implementation %s%s {\n", g.namePrefix, obj.Name())
|
||||
g.Printf("}\n\n")
|
||||
g.Printf("- (id)initWithRef:(GoSeqRef*)ref {\n")
|
||||
g.Printf("- (id)initWithRef:(id)ref {\n")
|
||||
g.Indent()
|
||||
g.Printf("self = [super init];\n")
|
||||
g.Printf("if (self) { _ref = ref; }\n")
|
||||
|
@ -227,8 +227,6 @@ void go_seq_send(char *descriptor, int code, GoSeq *req, GoSeq *res) {
|
||||
// init_seq is called when the Go side is initialized.
|
||||
void init_seq() {
|
||||
// TODO(hyangah): initialize a map of Objective-C objects passed to Go.
|
||||
|
||||
LOG_INFO(@"loaded go/Seq");
|
||||
}
|
||||
|
||||
GoSeqRef *go_seq_readRef(GoSeq *seq) {
|
||||
|
@ -6,15 +6,15 @@
|
||||
#ifndef __GoTestpkg_H__
|
||||
#define __GoTestpkg_H__
|
||||
|
||||
#include "seq.h"
|
||||
#include <Foundation/Foundation.h>
|
||||
|
||||
@class GoTestpkgS;
|
||||
|
||||
@interface GoTestpkgS : NSObject {
|
||||
}
|
||||
@property(strong, readonly) GoSeqRef *ref;
|
||||
@property(strong, readonly) id ref;
|
||||
|
||||
- (id)initWithRef:(GoSeqRef*)ref;
|
||||
- (id)initWithRef:(id)ref;
|
||||
- (double)X;
|
||||
- (void)setX:(double)v;
|
||||
- (double)Y;
|
||||
|
@ -31,7 +31,7 @@ static NSString *errDomain = @"go.golang.org/x/mobile/bind/objc/testpkg";
|
||||
@implementation GoTestpkgS {
|
||||
}
|
||||
|
||||
- (id)initWithRef:(GoSeqRef*)ref {
|
||||
- (id)initWithRef:(id)ref {
|
||||
self = [super init];
|
||||
if (self) { _ref = ref; }
|
||||
return self;
|
||||
|
2
bind/testdata/basictypes.objc.h.golden
vendored
2
bind/testdata/basictypes.objc.h.golden
vendored
@ -6,7 +6,7 @@
|
||||
#ifndef __GoBasictypes_H__
|
||||
#define __GoBasictypes_H__
|
||||
|
||||
#include "seq.h"
|
||||
#include <Foundation/Foundation.h>
|
||||
|
||||
FOUNDATION_EXPORT BOOL GoBasictypesBool(BOOL p0);
|
||||
|
||||
|
2
bind/testdata/interfaces.objc.h.golden
vendored
2
bind/testdata/interfaces.objc.h.golden
vendored
@ -6,7 +6,7 @@
|
||||
#ifndef __GoInterfaces_H__
|
||||
#define __GoInterfaces_H__
|
||||
|
||||
#include "seq.h"
|
||||
#include <Foundation/Foundation.h>
|
||||
|
||||
@class GoInterfacesI;
|
||||
|
||||
|
6
bind/testdata/issue10788.objc.h.golden
vendored
6
bind/testdata/issue10788.objc.h.golden
vendored
@ -6,7 +6,7 @@
|
||||
#ifndef __GoIssue10788_H__
|
||||
#define __GoIssue10788_H__
|
||||
|
||||
#include "seq.h"
|
||||
#include <Foundation/Foundation.h>
|
||||
|
||||
@class GoIssue10788TestInterface;
|
||||
|
||||
@ -15,9 +15,9 @@
|
||||
|
||||
@interface GoIssue10788TestStruct : NSObject {
|
||||
}
|
||||
@property(strong, readonly) GoSeqRef *ref;
|
||||
@property(strong, readonly) id ref;
|
||||
|
||||
- (id)initWithRef:(GoSeqRef*)ref;
|
||||
- (id)initWithRef:(id)ref;
|
||||
- (NSString*)Value;
|
||||
- (void)setValue:(NSString*)v;
|
||||
@end
|
||||
|
2
bind/testdata/issue10788.objc.m.golden
vendored
2
bind/testdata/issue10788.objc.m.golden
vendored
@ -20,7 +20,7 @@ static NSString *errDomain = @"go.issue10788";
|
||||
@implementation GoIssue10788TestStruct {
|
||||
}
|
||||
|
||||
- (id)initWithRef:(GoSeqRef*)ref {
|
||||
- (id)initWithRef:(id)ref {
|
||||
self = [super init];
|
||||
if (self) { _ref = ref; }
|
||||
return self;
|
||||
|
6
bind/testdata/structs.objc.h.golden
vendored
6
bind/testdata/structs.objc.h.golden
vendored
@ -6,15 +6,15 @@
|
||||
#ifndef __GoStructs_H__
|
||||
#define __GoStructs_H__
|
||||
|
||||
#include "seq.h"
|
||||
#include <Foundation/Foundation.h>
|
||||
|
||||
@class GoStructsS;
|
||||
|
||||
@interface GoStructsS : NSObject {
|
||||
}
|
||||
@property(strong, readonly) GoSeqRef *ref;
|
||||
@property(strong, readonly) id ref;
|
||||
|
||||
- (id)initWithRef:(GoSeqRef*)ref;
|
||||
- (id)initWithRef:(id)ref;
|
||||
- (double)X;
|
||||
- (void)setX:(double)v;
|
||||
- (double)Y;
|
||||
|
2
bind/testdata/structs.objc.m.golden
vendored
2
bind/testdata/structs.objc.m.golden
vendored
@ -25,7 +25,7 @@ static NSString *errDomain = @"go.structs";
|
||||
@implementation GoStructsS {
|
||||
}
|
||||
|
||||
- (id)initWithRef:(GoSeqRef*)ref {
|
||||
- (id)initWithRef:(id)ref {
|
||||
self = [super init];
|
||||
if (self) { _ref = ref; }
|
||||
return self;
|
||||
|
Loading…
x
Reference in New Issue
Block a user