1
0
forked from GitHub/gf-core

Java API for opening/closing SG databases

This commit is contained in:
krasimir
2015-09-03 13:52:32 +00:00
parent c322e686a0
commit 3328dd1f8d
8 changed files with 259 additions and 91 deletions

View File

@@ -0,0 +1,28 @@
#ifndef JNI_UTILS
#define JNI_UTILS
#define l2p(x) ((void*) (intptr_t) (x))
#define p2l(x) ((jlong) (intptr_t) (x))
jstring
gu2j_string(JNIEnv *env, GuString s);
GuString
j2gu_string(JNIEnv *env, jstring s, GuPool* pool);
size_t
gu2j_string_offset(GuString s, size_t offset);
size_t
j2gu_string_offset(GuString s, size_t joffset);
void*
get_ref(JNIEnv *env, jobject self);
void
throw_jstring_exception(JNIEnv *env, const char* class_name, jstring msg);
void
throw_string_exception(JNIEnv *env, const char* class_name, const char* msg);
#endif