From c8fb98139d128d61cd1c4695dc115d3a16da66b2 Mon Sep 17 00:00:00 2001 From: Anthony Green Date: Sat, 2 Jun 2001 08:49:31 +0000 Subject: USE_LIBFFI change From-SVN: r42791 --- libjava/java/lang/reflect/natMethod.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libjava/java/lang/reflect') diff --git a/libjava/java/lang/reflect/natMethod.cc b/libjava/java/lang/reflect/natMethod.cc index 61adf26..f269d2f 100644 --- a/libjava/java/lang/reflect/natMethod.cc +++ b/libjava/java/lang/reflect/natMethod.cc @@ -44,7 +44,11 @@ details. */ #include +#if USE_LIBFFI #include +#else +#include +#endif // FIXME: remove these. #define BooleanClass java::lang::Boolean::class$ @@ -107,6 +111,7 @@ can_widen (jclass from, jclass to) return fromx <= tox; } +#ifdef USE_LIBFFI static inline ffi_type * get_ffi_type (jclass klass) { @@ -148,6 +153,7 @@ get_ffi_type (jclass klass) return r; } +#endif // USE_LIBFFI jobject java::lang::reflect::Method::invoke (jobject obj, jobjectArray args) @@ -312,6 +318,7 @@ _Jv_CallAnyMethodA (jobject obj, jvalue *args, jvalue *result) { +#ifdef USE_LIBFFI JvAssert (! is_constructor || ! obj); JvAssert (! is_constructor || return_type); @@ -428,6 +435,10 @@ _Jv_CallAnyMethodA (jobject obj, result->l = obj; return ex; +#else + throw new java::lang::UnsupportedOperationException; + return 0; +#endif // USE_LIBFFI } // This is another version of _Jv_CallAnyMethodA, but this one does -- cgit v1.1