* Merged with default branch at rev 16f3633aaa5a.
[cacao.git] / src / native / vm / java_lang_Thread.c
index a823022f355be84757dc174346be60bc92b9dc0c..f2ec76695c16a6015f3e32a2a09a31479506210f 100644 (file)
@@ -107,7 +107,7 @@ void _Jv_java_lang_Thread_interrupt(java_lang_Thread *this)
        threadobject *thread;
 
 #if defined(WITH_CLASSPATH_GNU)
-       thread = (threadobject *) LLNI_field_direct(LLNI_field_direct(this, vmThread), vmdata);
+       thread = (threadobject *) LLNI_field_direct(this, vmThread)->vmdata;
 #elif defined(WITH_CLASSPATH_CLDC1_1)
        thread = (threadobject *) this->vm_thread;
 #endif
@@ -129,7 +129,7 @@ s4 _Jv_java_lang_Thread_isAlive(java_lang_Thread *this)
 
 # if defined(WITH_CLASSPATH_GNU)
 
-       t = (threadobject *) LLNI_field_direct(LLNI_field_direct(this, vmThread), vmdata);
+       t = (threadobject *) LLNI_field_direct(this, vmThread)->vmdata;
 
 # elif defined(WITH_CLASSPATH_SUN)
 
@@ -177,7 +177,7 @@ s4 _Jv_java_lang_Thread_isInterrupted(java_lang_Thread *this)
        threadobject *t;
 
 # if defined(WITH_CLASSPATH_GNU)
-       t = (threadobject *) LLNI_field_direct(LLNI_field_direct(this, vmThread), vmdata);
+       t = (threadobject *) LLNI_field_direct(this, vmThread)->vmdata;
 # elif defined(WITH_CLASSPATH_SUN)
        /* XXX this is just a quick hack */
 
@@ -233,7 +233,7 @@ void _Jv_java_lang_Thread_setPriority(java_lang_Thread *this, s4 priority)
        threadobject *t;
 
 # if defined(WITH_CLASSPATH_GNU)
-       t = (threadobject *) LLNI_field_direct(LLNI_field_direct(this, vmThread), vmdata);
+       t = (threadobject *) LLNI_field_direct(this, vmThread)->vmdata;
 # elif defined(WITH_CLASSPATH_SUN)
        /* XXX this is just a quick hack */
 
@@ -291,7 +291,7 @@ java_lang_Thread *_Jv_java_lang_Thread_currentThread(void)
 #if defined(ENABLE_THREADS)
        thread = THREADOBJECT;
 
-       t = thread->object;
+       t = LLNI_WRAP(thread->object);
 
        if (t == NULL)
                log_text("t ptr is NULL\n");
@@ -383,7 +383,7 @@ java_lang_String *_Jv_java_lang_Thread_getState(java_lang_Thread *this)
        java_handle_t *o;
 
 # if defined(WITH_CLASSPATH_GNU)
-       thread = (threadobject *) LLNI_field_direct(LLNI_field_direct(this, vmThread), vmdata);
+       thread = (threadobject *) LLNI_field_direct(this, vmThread)->vmdata;
 # elif defined(WITH_CLASSPATH_CLDC1_1)
        thread = (threadobject *) this->vm_thread;
 # endif