bind,internal/importers: handle Java long constants correctly

Change-Id: Idff789038e7470ef5b12798273fc67165d57f4dc
Reviewed-on: https://go-review.googlesource.com/35293
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Elias Naur
2017-01-17 15:58:41 +00:00
parent d05d36a362
commit c4d780faeb
6 changed files with 172 additions and 2 deletions
+26
View File
@@ -11,6 +11,19 @@ public interface F extends R {
}
// Java class java.L is a proxy for talking to a Go program.
// gobind -lang=java java
//
// File is generated by gobind. Do not edit.
package java;
import go.Seq;
public interface L extends R {
public String toString();
}
// Java class java.O is a proxy for talking to a Go program.
// gobind -lang=java java
//
@@ -83,6 +96,19 @@ public abstract class Java {
public native String toString();
}
private static final class proxyL implements Seq.Proxy, L {
private final Seq.Ref ref;
@Override public final int incRefnum() {
int refnum = ref.refnum;
Seq.incGoRef(refnum);
return refnum;
}
proxyL(Seq.Ref ref) { this.ref = ref; }
public native String toString();
}
private static final class proxyO implements Seq.Proxy, O {
private final Seq.Ref ref;