Merged with michi branch at rev 1684fe51cf3d.
[cacao.git] / src / native / vm / cldc1.1 / java_lang_Throwable.cpp
index cdd6a6c86c21eb0178a7588d670768d2765adc79..f5d566ea574bf47e299a24065d99c7d2629b33aa 100644 (file)
 #include <assert.h>
 #include <stdint.h>
 
-#include "native/jni.h"
+#include "native/jni.hpp"
 #include "native/llni.h"
-#include "native/native.h"
+#include "native/native.hpp"
 
 #if defined(ENABLE_JNI_HEADERS)
 # include "native/include/java_lang_Throwable.h"
 #endif
 
 #include "vm/exceptions.hpp"
+#include "vm/javaobjects.hpp"
 
 #include "vm/jit/stacktrace.hpp"
 
-#include "vmcore/javaobjects.hpp"
-
 
 // Native functions are exported as C functions.
 extern "C" {
@@ -93,16 +92,12 @@ static JNINativeMethod methods[] = {
  
 *******************************************************************************/
  
-// FIXME
-extern "C" {
 void _Jv_java_lang_Throwable_init(void)
 {
-       utf *u;
+       utf* u = utf_new_char("java/lang/Throwable");
  
-       u = utf_new_char("java/lang/Throwable");
-       native_method_register(u, methods, NATIVE_METHODS_COUNT);
-}
+       NativeMethods& nm = VM::get_current()->get_nativemethods();
+       nm.register_methods(u, methods, NATIVE_METHODS_COUNT);
 }