Commit 562ff163 by Anthony Green Committed by Anthony Green

Add pointer support to the reflection code.

From-SVN: r50180
parent cc36a670
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment