* src/native/llni.h: Added macros for array handling.
[cacao.git] / src / vmcore / method.c
index da7473d1d849bd5e646fd6116ebf7734ced7702f..d4ff6655bc5e32e8493470f92c53b96a8a01b096 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: method.c 8315 2007-08-15 22:49:20Z panzi $
+   $Id: method.c 8318 2007-08-16 10:05:34Z michi $
 
 */
 
@@ -37,6 +37,8 @@
 
 #include "mm/memory.h"
 
+#include "native/llni.h"
+
 #include "threads/lock-common.h"
 
 #include "vm/builtin.h"
@@ -624,14 +626,14 @@ int32_t method_get_parametercount(methodinfo *m)
 
 *******************************************************************************/
 
-java_objectarray *method_get_parametertypearray(methodinfo *m)
+java_handle_objectarray_t *method_get_parametertypearray(methodinfo *m)
 {
-       methoddesc       *md;
-       typedesc         *paramtypes;
-       int32_t           paramcount;
-       java_objectarray *oa;
-       int32_t           i;
-       classinfo        *c;
+       methoddesc                *md;
+       typedesc                  *paramtypes;
+       int32_t                    paramcount;
+       java_handle_objectarray_t *oa;
+       int32_t                    i;
+       classinfo                 *c;
 
        md = m->parseddesc;
 
@@ -664,7 +666,7 @@ java_objectarray *method_get_parametertypearray(methodinfo *m)
                if (!resolve_class_from_typedesc(&paramtypes[i], true, false, &c))
                        return NULL;
 
-               oa->data[i] = c;
+               LLNI_array_direct(oa, i) = (java_object_t *) c;
        }
 
        return oa;
@@ -677,11 +679,11 @@ java_objectarray *method_get_parametertypearray(methodinfo *m)
 
 *******************************************************************************/
 
-java_objectarray *method_get_exceptionarray(methodinfo *m)
+java_handle_objectarray_t *method_get_exceptionarray(methodinfo *m)
 {
-       java_objectarray *oa;
-       classinfo        *c;
-       s4                i;
+       java_handle_objectarray_t *oa;
+       classinfo                 *c;
+       s4                         i;
 
        /* create class-array */
 
@@ -698,7 +700,7 @@ java_objectarray *method_get_exceptionarray(methodinfo *m)
                if (c == NULL)
                        return NULL;
 
-               oa->data[i] = c;
+               LLNI_array_direct(oa, i) = (java_object_t *) c;
        }
 
        return oa;