64 lines
1.8 KiB
Plaintext
64 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 "basictypes.h"
|
||
|
#include "_cgo_export.h"
|
||
|
|
||
|
|
||
|
|
||
|
JNIEXPORT void JNICALL
|
||
|
Java_go_basictypes_Basictypes_init(JNIEnv *env, jclass _unused) {
|
||
|
jclass clazz;
|
||
|
}
|
||
|
|
||
|
JNIEXPORT jboolean JNICALL
|
||
|
Java_go_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_go_basictypes_Basictypes_ByteArrays(JNIEnv* env, jclass clazz, jbyteArray x) {
|
||
|
nbyteslice _x = go_seq_from_java_bytearray(env, x, 0);
|
||
|
nbyteslice r0 = proxybasictypes__ByteArrays(_x);
|
||
|
if (_x.ptr != NULL) {
|
||
|
(*env)->ReleaseByteArrayElements(env, x, _x.ptr, 0);
|
||
|
}
|
||
|
jbyteArray _r0 = go_seq_to_java_bytearray(env, r0, 1);
|
||
|
return _r0;
|
||
|
}
|
||
|
|
||
|
JNIEXPORT void JNICALL
|
||
|
Java_go_basictypes_Basictypes_Error(JNIEnv* env, jclass clazz) {
|
||
|
nstring r0 = proxybasictypes__Error();
|
||
|
jstring _r0 = go_seq_to_java_string(env, r0);
|
||
|
go_seq_maybe_throw_exception(env, _r0);
|
||
|
}
|
||
|
|
||
|
JNIEXPORT jlong JNICALL
|
||
|
Java_go_basictypes_Basictypes_ErrorPair(JNIEnv* env, jclass clazz) {
|
||
|
struct proxybasictypes__ErrorPair_return res = proxybasictypes__ErrorPair();
|
||
|
jlong _r0 = (jlong)res.r0;
|
||
|
jstring _r1 = go_seq_to_java_string(env, res.r1);
|
||
|
go_seq_maybe_throw_exception(env, _r1);
|
||
|
return _r0;
|
||
|
}
|
||
|
|
||
|
JNIEXPORT void JNICALL
|
||
|
Java_go_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);
|
||
|
}
|
||
|
|