2
0
mirror of synced 2025-02-23 14:58:12 +00:00
mobile/bind/testdata/basictypes.java.c.golden
Elias Naur c90c4f7c8a bind,internal: change the default Java package to the empty string
The Objective-C bindings was recently changed to support the empty
name prefix and to use that as the default. This CLs changed the Java
generators in the same way, supporting the empty Java package and using
it as the default.

Change-Id: I857affce686c67638a2b6c4e1da5d6a88d7ba560
Reviewed-on: https://go-review.googlesource.com/34778
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2017-01-11 19:15:09 +00:00

61 lines
1.8 KiB
Plaintext

// JNI functions for the Go <=> Java bridge.
// gobind -lang=java basictypes
//
// File is generated by gobind. Do not edit.
#include <android/log.h>
#include <stdint.h>
#include "seq.h"
#include "_cgo_export.h"
#include "basictypes.h"
JNIEXPORT void JNICALL
Java_basictypes_Basictypes__1init(JNIEnv *env, jclass _unused) {
jclass clazz;
}
JNIEXPORT jboolean JNICALL
Java_basictypes_Basictypes_bool(JNIEnv* env, jclass _clazz, jboolean p0) {
char _p0 = (char)p0;
char r0 = proxybasictypes__Bool(_p0);
jboolean _r0 = r0 ? JNI_TRUE : JNI_FALSE;
return _r0;
}
JNIEXPORT jbyteArray JNICALL
Java_basictypes_Basictypes_byteArrays(JNIEnv* env, jclass _clazz, jbyteArray x) {
nbyteslice _x = go_seq_from_java_bytearray(env, x, 0);
nbyteslice r0 = proxybasictypes__ByteArrays(_x);
go_seq_release_byte_array(env, x, _x.ptr);
jbyteArray _r0 = go_seq_to_java_bytearray(env, r0, 1);
return _r0;
}
JNIEXPORT void JNICALL
Java_basictypes_Basictypes_error(JNIEnv* env, jclass _clazz) {
int32_t r0 = proxybasictypes__Error();
jobject _r0 = go_seq_from_refnum(env, r0, proxy_class__error, proxy_class__error_cons);
go_seq_maybe_throw_exception(env, _r0);
}
JNIEXPORT jlong JNICALL
Java_basictypes_Basictypes_errorPair(JNIEnv* env, jclass _clazz) {
struct proxybasictypes__ErrorPair_return res = proxybasictypes__ErrorPair();
jlong _r0 = (jlong)res.r0;
jobject _r1 = go_seq_from_refnum(env, res.r1, proxy_class__error, proxy_class__error_cons);
go_seq_maybe_throw_exception(env, _r1);
return _r0;
}
JNIEXPORT void JNICALL
Java_basictypes_Basictypes_ints(JNIEnv* env, jclass _clazz, jbyte x, jshort y, jint z, jlong t, jlong 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);
}