1 %{ 2 #include <gcj/cni.h> 3 %} 4 5 %include <gcj/javaprims.i> 6 7 extern jobject JvAllocObject (jclass cls); 8 9 extern jobject JvAllocObject (jclass cls, jsize sz); 10 11 extern void JvInitClass (jclass cls); 12 13 extern jstring JvAllocString (jsize sz); 14 15 extern jstring JvNewString (const jchar *chars, jsize len); 16 17 extern jstring JvNewStringLatin1 (const char *bytes, jsize len); 18 19 extern jstring JvNewStringLatin1 (const char *bytes); 20 21 extern jchar* JvGetStringChars (jstring str); 22 23 extern jsize JvGetStringUTFLength (jstring string); 24 25 extern jsize JvGetStringUTFRegion (jstring str, jsize start, jsize len, char *buf); 26 27 extern jstring JvNewStringUTF (const char *bytes); 28 29 extern void *JvMalloc (jsize size); 30 31 extern void JvFree (void *ptr); 32 33 extern jint JvCreateJavaVM (void* vm_args); 34 35 extern java::lang::Thread* JvAttachCurrentThread (jstring name, java::lang::ThreadGroup* group); 36 37 extern java::lang::Thread* JvAttachCurrentThreadAsDaemon (jstring name, java::lang::ThreadGroup* group); 38 39 extern jint JvDetachCurrentThread (void); 40 41 42 %include <gcj/cni.swg> 43 44