Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
M. Probst, S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck,
- P. Tomsich, J. Wenninger
+ P. Tomsich, J. Wenninger, M. Platter
This file is part of CACAO.
Authors: ?
- Changes: Joseph Wenninger
+ Changes: Joseph Wenninger, Martin Platter
- $Id: jni.c 1173 2004-06-16 14:56:18Z jowenn $
+ $Id: jni.c 1384 2004-08-02 11:41:26Z motse $
*/
#include <string.h>
+#include "exceptions.h"
#include "main.h"
#include "jni.h"
#include "global.h"
#include "tables.h"
#include "native.h"
#include "builtin.h"
+#include "options.h"
+#include "statistics.h"
#include "threads/thread.h"
#include "toolbox/logging.h"
#include "toolbox/memory.h"
jni_callblock *blk;
jlong ret;
- /*
+/*
log_text("JNI-Call: CallObjectMethodV");
utf_display(methodID->name);
utf_display(methodID->descriptor);
printf("\nParmaeter count: %d\n",argcount);
utf_display(obj->vftbl->class->name);
printf("\n");
- */
+*/
if (methodID == 0) {
*exceptionptr = new_exception(string_java_lang_NoSuchMethodError);
return 0;
blk = MNEW(jni_callblock, 4 /*argcount+2*/);
- fill_callblock(obj, methodID->descriptor, blk, args, 'L');
+ fill_callblock(obj, methodID->descriptor, blk, args, 'J');
/* printf("parameter: obj: %p",blk[0].item); */
ret = asm_calljavafunction2long(methodID,
jlong CallLongMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...)
{
- log_text("JNI-Call: CallLongMethod");
+ jlong ret;
+ va_list vaargs;
+
+ va_start(vaargs,methodID);
+ ret = callLongMethod(obj,get_virtual(obj, methodID),vaargs);
+ va_end(vaargs);
- return 0;
+ return ret;
}
jlong CallLongMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args)
{
- log_text("JNI-Call: CallLongMethodV");
-
- return 0;
+ return callLongMethod(obj,get_virtual(obj, methodID),args);
}