Signed-off-by: Tomek Grabiec <tgrab...@gmail.com>
---
 vm/jni-interface.c |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/vm/jni-interface.c b/vm/jni-interface.c
index c2cd110..87ef59a 100644
--- a/vm/jni-interface.c
+++ b/vm/jni-interface.c
@@ -629,6 +629,26 @@ static jboolean vm_jni_call_boolean_method(struct 
vm_jni_env *env, jobject this,
        return result;
 }
 
+static jobject vm_jni_call_object_method(struct vm_jni_env *env, jobject this,
+                                        jmethodID methodID, ...)
+{
+       va_list args;
+       jobject result;
+
+       enter_vm_from_jni();
+
+       /*
+        * TODO: When these functions are used to call private methods
+        * and constructors, the method ID must be derived from the
+        * real class of obj, not from one of its superclasses.
+        */
+       va_start(args, methodID);
+       result = (jobject) vm_call_method_this_v(methodID, this, args);
+       va_end(args);
+
+       return result;
+}
+
 /*
  * The JNI native interface table.
  * See: http://java.sun.com/j2se/1.4.2/docs/guide/jni/spec/functions.html
@@ -681,7 +701,7 @@ void *vm_jni_native_interface[] = {
        vm_jni_get_object_class, /* GetObjectClass */
        NULL, /* IsInstanceOf */
        vm_jni_get_method_id,
-       NULL, /* CallObjectMethod */
+       vm_jni_call_object_method,
 
        /* 35 */
        NULL, /* CallObjectMethodV */
-- 
1.6.0.6


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jatovm-devel mailing list
Jatovm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Reply via email to