* Merged with default branch at rev 16f3633aaa5a.
[cacao.git] / src / vm / properties.c
index 1eef3c8c036cf6296dbf5cb245e40a2f3a3c80dc..1f2e6f0762df2146e08ae720582126628ca102df 100644 (file)
@@ -43,6 +43,7 @@
 #include "mm/memory.h"
 
 #include "native/jni.h"
+#include "native/llni.h"
 
 #include "vm/global.h"                      /* required by java_lang_String.h */
 #include "native/include/java_lang_String.h"
@@ -56,6 +57,7 @@
 
 #include "vm/jit/asmpart.h"
 
+#include "vmcore/class.h"
 #include "vmcore/method.h"
 #include "vmcore/options.h"
 
@@ -612,13 +614,16 @@ char *properties_get(char *key)
 
 void properties_system_add(java_handle_t *p, char *key, char *value)
 {
+       classinfo     *c;
        methodinfo    *m;
        java_handle_t *k;
        java_handle_t *v;
 
        /* search for method to add properties */
 
-       m = class_resolveclassmethod(p->vftbl->class,
+       LLNI_class_get(p, c);
+
+       m = class_resolveclassmethod(c,
                                                                 utf_put,
                                                                 utf_new_char("(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"),
                                                                 NULL,
@@ -650,13 +655,16 @@ void properties_system_add(java_handle_t *p, char *key, char *value)
 void properties_system_add_all(java_handle_t *p)
 {
        list_properties_entry_t *pe;
+       classinfo               *c;
        methodinfo              *m;
        java_handle_t           *key;
        java_handle_t           *value;
 
        /* search for method to add properties */
 
-       m = class_resolveclassmethod(p->vftbl->class,
+       LLNI_class_get(p, c);
+
+       m = class_resolveclassmethod(c,
                                                                 utf_put,
                                                                 utf_new_char("(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"),
                                                                 NULL,