* src/vm/vm.cpp (vm_abort_errnum, vm_abort_errno): Removed obsolete functions.
[cacao.git] / src / native / vm / cldc1.1 / java_lang_Double.cpp
index 19146e44c184a7b1696d1cb1a9e49bd1a3c985ea..6f5f701b3ffe3ba4d10c0ac65d72620635118ee9 100644 (file)
 #include <stdint.h>
 
 #include "native/jni.hpp"
-#include "native/native.h"
+#include "native/native.hpp"
 
 #if defined(ENABLE_JNI_HEADERS)
 # include "native/include/java_lang_Double.h"
 #endif
 
+#include "vm/vm.hpp"
+
 #include "vm/jit/builtin.hpp"
 
 
@@ -105,16 +107,12 @@ static JNINativeMethod methods[] = {
  
 *******************************************************************************/
 
-// FIXME
-extern "C" { 
 void _Jv_java_lang_Double_init(void)
 {
-       utf *u;
-       u = utf_new_char("java/lang/Double");
+       utf* u = utf_new_char("java/lang/Double");
  
-       native_method_register(u, methods, NATIVE_METHODS_COUNT);
-}
+       NativeMethods& nm = VM::get_current()->get_nativemethods();
+       nm.register_methods(u, methods, NATIVE_METHODS_COUNT);
 }