natClass.cc (getMethod): Compute offset relative to klass's methods table, not
this's table.
* java/lang/natClass.cc (getMethod): Compute offset relative to `klass's methods table, not `this's table. * java/lang/reflect/natMethod.cc (_Jv_CallNonvirtualMethodA): In unwrapping/widening case, check whether `k' is null, not whether it is primitive. Initialize `num' from `argelts', not `paramelts'. Correct create and pass arguments to ffi_call. Don't let presence of `this' argument affect index used to look in argument arrays. (COPY): Set appropriate element in `values' vector. From-SVN: r31253
This commit is contained in:
parent
fe5a581031
commit
41ecf9300e
3 changed files with 38 additions and 25 deletions
|
@ -477,7 +477,8 @@ java::lang::Class::getMethod (jstring name, JArray<jclass> *param_types)
|
|||
break;
|
||||
|
||||
Method *rmethod = new Method ();
|
||||
rmethod->offset = (char*) (&klass->methods[i]) - (char*) methods;
|
||||
rmethod->offset = ((char *) (&klass->methods[i])
|
||||
- (char *) klass->methods);
|
||||
rmethod->declaringClass = klass;
|
||||
return rmethod;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue