self.target = target
self.c_array_class_caches = set()
self.c_type_map = dict(
+ bool = ['boolean'],
uint8_t = ['byte'],
uint16_t = ['short'],
uint32_t = ['int'],
}
}"""
- self.bindings_footer = "}\n"
-
self.util_fn_pfx = """package org.ldk.structs;
import org.ldk.impl.bindings;
import org.ldk.enums.*;
import javax.annotation.Nullable;
"""
+ self.hu_struct_file_suffix = ""
self.c_fn_ty_pfx = "JNIEXPORT "
self.c_fn_args_pfx = "JNIEnv *env, jclass clz"
self.file_ext = ".java"
self.is_arr_some_check = ("", " != NULL")
self.get_native_arr_len_call = ("(*env)->GetArrayLength(env, ", ")")
+ def bindings_footer(self):
+ return "}\n"
+
def construct_jenv(self):
res = "JNIEnv *env;\n"
res += "jint get_jenv_res = (*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6);\n"