| // Code generated by gobind. DO NOT EDIT. |
| |
| // JNI functions for the Go <=> Java bridge. |
| // |
| // autogenerated by gobind -lang=java basictypes |
| |
| #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); |
| } |
| |