Add pointer support to the reflection code.
From-SVN: r50180
This commit is contained in:
parent
cc36a670f7
commit
562ff1637f
2 changed files with 49 additions and 29 deletions
|
@ -1,3 +1,16 @@
|
|||
2002-02-28 Anthony Green <green@redhat.com>
|
||||
|
||||
* java/lang/reflect/natMethod.cc (result): Add void* element.
|
||||
(_Jv_CallAnyMethodA): Handle FFI_TYPE_POINTER arguments. Move
|
||||
constructor test.
|
||||
|
||||
2002-02-17 Anthony Green <green@redhat.com>
|
||||
|
||||
* configure.host (FILE): New macro for specifing File
|
||||
implementation.
|
||||
* configure: Rebuilt.
|
||||
* configure.in: Use FILE. Define HAVE_TIME for newlib targets.
|
||||
|
||||
2002-02-27 Adam Megacz <adam@xwt.org>
|
||||
|
||||
* java/net/natInetAddress.cc: Changed USE_WINSOCK to WIN32, added
|
||||
|
|
|
@ -426,6 +426,7 @@ _Jv_CallAnyMethodA (jobject obj,
|
|||
union
|
||||
{
|
||||
ffi_arg i;
|
||||
jobject o;
|
||||
jlong l;
|
||||
jfloat f;
|
||||
jdouble d;
|
||||
|
@ -448,6 +449,10 @@ _Jv_CallAnyMethodA (jobject obj,
|
|||
// a narrowing conversion for jbyte, jchar, etc. results.
|
||||
// Note that boolean is handled either by the FFI_TYPE_SINT8 or
|
||||
// FFI_TYPE_SINT32 case.
|
||||
if (is_constructor)
|
||||
result->l = obj;
|
||||
else
|
||||
{
|
||||
switch (rtype->type)
|
||||
{
|
||||
case FFI_TYPE_VOID:
|
||||
|
@ -473,12 +478,14 @@ _Jv_CallAnyMethodA (jobject obj,
|
|||
case FFI_TYPE_DOUBLE:
|
||||
result->d = (jdouble)ffi_result.d;
|
||||
break;
|
||||
case FFI_TYPE_POINTER:
|
||||
result->l = (jobject)ffi_result.o;
|
||||
break;
|
||||
default:
|
||||
JvFail ("Unknown ffi_call return type");
|
||||
break;
|
||||
}
|
||||
if (is_constructor)
|
||||
result->l = obj;
|
||||
}
|
||||
|
||||
return ex;
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue