Commit 5ef57049 by Tom Tromey Committed by Tom Tromey

* jni.cc (_Jv_JNI_CallStaticMethodV): Added some assertions.

From-SVN: r32021
parent c082d01f
2000-02-16 Tom Tromey <tromey@cygnus.com>
* jni.cc (_Jv_JNI_CallStaticMethodV): Added some assertions.
* jni.cc (_Jv_JNI_NewObjectV): Corrected assertion.
(_Jv_JNI_NewObject): Likewise.
(_Jv_JNI_NewObjectA): Likewise.
......
......@@ -756,6 +756,9 @@ static T
_Jv_JNI_CallStaticMethodV (JNIEnv *env, jclass klass,
jmethodID id, va_list args)
{
JvAssert (((id->accflags) & java::lang::reflect::Modifier::STATIC));
JvAssert ((&ClassClass)->isInstance (klass));
return _Jv_JNI_CallAnyMethodV<T, static_type> (env, NULL, klass, id, args);
}
......@@ -768,6 +771,9 @@ _Jv_JNI_CallStaticMethod (JNIEnv *env, jclass klass, jmethodID id, ...)
va_list args;
T result;
JvAssert (((id->accflags) & java::lang::reflect::Modifier::STATIC));
JvAssert ((&ClassClass)->isInstance (klass));
va_start (args, id);
result = _Jv_JNI_CallAnyMethodV<T, static_type> (env, NULL, klass,
id, args);
......@@ -783,6 +789,9 @@ static T
_Jv_JNI_CallStaticMethodA (JNIEnv *env, jclass klass, jmethodID id,
jvalue *args)
{
JvAssert (((id->accflags) & java::lang::reflect::Modifier::STATIC));
JvAssert ((&ClassClass)->isInstance (klass));
return _Jv_JNI_CallAnyMethodA<T, static_type> (env, NULL, klass, id, args);
}
......
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