* src/mm/memory.cpp,
[cacao.git] / src / native / vm / gnuclasspath / sun_reflect_ConstantPool.cpp
index 3b54046650f1ec36e8959c151bd9a4e4f696e021..b811d6068dca24d65060697de33a1f9a57f3d283 100644 (file)
 #include <assert.h>
 #include <stdint.h>
 
-#include "mm/memory.h"
+#include "mm/memory.hpp"
 
 #include "native/jni.hpp"
 #include "native/llni.h"
-#include "native/native.h"
+#include "native/native.hpp"
 
 // FIXME
 //#include "native/include/sun_reflect_ConstantPool.h"
 
 #include "native/vm/reflection.hpp"
 
-#include "toolbox/logging.h"
+#include "toolbox/logging.hpp"
 
-#include "vm/class.h"
+#include "vm/class.hpp"
 #include "vm/exceptions.hpp"
 #include "vm/javaobjects.hpp"
-#include "vm/resolve.h"
+#include "vm/resolve.hpp"
 #include "vm/string.hpp"
 #include "vm/utf8.h"
 #include "vm/vm.hpp"
@@ -416,12 +416,12 @@ static JNINativeMethod methods[] = {
 
 *******************************************************************************/
 
-// FIXME
-extern "C" {
 void _Jv_sun_reflect_ConstantPool_init(void)
 {
-       native_method_register(utf_new_char("sun/reflect/ConstantPool"), methods, NATIVE_METHODS_COUNT);
-}
+       utf* u = utf_new_char("sun/reflect/ConstantPool");
+
+       NativeMethods& nm = VM::get_current()->get_nativemethods();
+       nm.register_methods(u, methods, NATIVE_METHODS_COUNT);
 }