github.com/thommil/tge-mobile@v0.0.0-20190308225214-66a08abd51aa/bind/testdata/underscores.java.c.golden (about) 1 // JNI functions for the Go <=> Java bridge. 2 // gobind -lang=java underscores 3 // 4 // File is generated by gobind. Do not edit. 5 6 #include <android/log.h> 7 #include <stdint.h> 8 #include "seq.h" 9 #include "_cgo_export.h" 10 #include "underscore_pkg.h" 11 12 jclass proxy_class_underscore_pkg_Underscore_struct; 13 jmethodID proxy_class_underscore_pkg_Underscore_struct_cons; 14 15 JNIEXPORT void JNICALL 16 Java_underscore_1pkg_Underscore_1pkg__1init(JNIEnv *env, jclass _unused) { 17 jclass clazz; 18 clazz = (*env)->FindClass(env, "underscore_pkg/Underscore_struct"); 19 proxy_class_underscore_pkg_Underscore_struct = (*env)->NewGlobalRef(env, clazz); 20 proxy_class_underscore_pkg_Underscore_struct_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); 21 } 22 23 JNIEXPORT void JNICALL 24 Java_underscore_1pkg_Underscore_1pkg_underscore_1func(JNIEnv* env, jclass _clazz) { 25 proxyunderscore_pkg__Underscore_func(); 26 } 27 28 JNIEXPORT jint JNICALL 29 Java_underscore_1pkg_Underscore_1struct__1_1New(JNIEnv *env, jclass clazz) { 30 return new_underscore_pkg_Underscore_struct(); 31 } 32 33 JNIEXPORT void JNICALL 34 Java_underscore_1pkg_Underscore_1struct_setUnderscore_1field(JNIEnv *env, jobject this, jstring v) { 35 int32_t o = go_seq_to_refnum_go(env, this); 36 nstring _v = go_seq_from_java_string(env, v); 37 proxyunderscore_pkg_Underscore_struct_Underscore_field_Set(o, _v); 38 } 39 40 JNIEXPORT jstring JNICALL 41 Java_underscore_1pkg_Underscore_1struct_getUnderscore_1field(JNIEnv *env, jobject this) { 42 int32_t o = go_seq_to_refnum_go(env, this); 43 nstring r0 = proxyunderscore_pkg_Underscore_struct_Underscore_field_Get(o); 44 jstring _r0 = go_seq_to_java_string(env, r0); 45 return _r0; 46 } 47 48 JNIEXPORT void JNICALL 49 Java_underscore_1pkg_Underscore_1pkg_setUnderscore_1var(JNIEnv *env, jclass clazz, jlong v) { 50 nint _v = (nint)v; 51 var_setunderscore_pkg_Underscore_var(_v); 52 } 53 54 JNIEXPORT jlong JNICALL 55 Java_underscore_1pkg_Underscore_1pkg_getUnderscore_1var(JNIEnv *env, jclass clazz) { 56 nint r0 = var_getunderscore_pkg_Underscore_var(); 57 jlong _r0 = (jlong)r0; 58 return _r0; 59 } 60