[llvm-commits] CVS: llvm-java/runtime/runtime.h jni.c
Alkis Evlogimenos
alkis at cs.uiuc.edu
Sun Apr 3 16:10:55 PDT 2005
Changes in directory llvm-java/runtime:
runtime.h updated: 1.5 -> 1.6
jni.c updated: 1.4 -> 1.5
---
Log message:
Implement GetObjectArrayElement and SetObjectArrayElement.
---
Diffs of the changes: (+12 -1)
jni.c | 11 +++++++++++
runtime.h | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
Index: llvm-java/runtime/runtime.h
diff -u llvm-java/runtime/runtime.h:1.5 llvm-java/runtime/runtime.h:1.6
--- llvm-java/runtime/runtime.h:1.5 Sun Apr 3 18:05:07 2005
+++ llvm-java/runtime/runtime.h Sun Apr 3 18:10:44 2005
@@ -71,7 +71,7 @@
struct llvm_java_typeinfo typeinfo;
};
-#define HANDLE_NATIVE_TYPE(TYPE) \
+#define HANDLE_TYPE(TYPE) \
struct llvm_java_##TYPE##array { \
struct llvm_java_object_base object_base; \
jint length; \
Index: llvm-java/runtime/jni.c
diff -u llvm-java/runtime/jni.c:1.4 llvm-java/runtime/jni.c:1.5
--- llvm-java/runtime/jni.c:1.4 Sun Apr 3 18:06:02 2005
+++ llvm-java/runtime/jni.c Sun Apr 3 18:10:44 2005
@@ -135,6 +135,17 @@
return ((struct llvm_java_booleanarray*) array)->length;
}
+static jobject get_object_array_element(JNIEnv* env, jarray array, jsize i) {
+ return ((struct llvm_java_objectarray*) array)->data[i];
+}
+
+static void set_object_array_element(JNIEnv* env,
+ jarray array,
+ jsize i,
+ jobject value) {
+ ((struct llvm_java_objectarray*) array)->data[i] = value;
+}
+
#define HANDLE_NATIVE_TYPE(TYPE) \
static j ## TYPE* get_##TYPE##_array_elements( \
JNIEnv* env, \
More information about the llvm-commits
mailing list