obj = unwrap (obj);
klass = unwrap (klass);
- if (style == normal)
- id = _Jv_LookupDeclaredMethod (obj->getClass (), id->name, id->signature);
-
jclass decl_class = klass ? klass : obj->getClass ();
JvAssert (decl_class != NULL);
jvalue result;
_Jv_CallAnyMethodA (obj, return_type, id,
style == constructor,
+ style == normal,
arg_types, args, &result);
return wrap_value (env, extract_from_jvalue<T>(result));
obj = unwrap (obj);
klass = unwrap (klass);
- if (style == normal)
- id = _Jv_LookupDeclaredMethod (obj->getClass (), id->name, id->signature);
-
jclass decl_class = klass ? klass : obj->getClass ();
JvAssert (decl_class != NULL);
jvalue result;
_Jv_CallAnyMethodA (obj, return_type, id,
style == constructor,
+ style == normal,
arg_types, arg_copy, &result);
return wrap_value (env, extract_from_jvalue<T>(result));
obj = unwrap (obj);
klass = unwrap (klass);
- if (style == normal)
- id = _Jv_LookupDeclaredMethod (obj->getClass (), id->name, id->signature);
-
jclass decl_class = klass ? klass : obj->getClass ();
JvAssert (decl_class != NULL);
_Jv_CallAnyMethodA (obj, return_type, id,
style == constructor,
+ style == normal,
arg_types, args, NULL);
}
catch (jthrowable t)
(JNICALL _Jv_JNI_CallAnyVoidMethodA) (JNIEnv *env, jobject obj, jclass klass,
jmethodID id, jvalue *args)
{
- if (style == normal)
- id = _Jv_LookupDeclaredMethod (obj->getClass (), id->name, id->signature);
-
jclass decl_class = klass ? klass : obj->getClass ();
JvAssert (decl_class != NULL);
_Jv_CallAnyMethodA (obj, return_type, id,
style == constructor,
+ style == normal,
arg_types, args, NULL);
}
catch (jthrowable t)
(JNICALL _Jv_JNI_GetStringUTFChars) (JNIEnv *env, jstring string,
jboolean *isCopy)
{
- string = unwrap (string);
- jsize len = JvGetStringUTFLength (string);
try
{
+ string = unwrap (string);
+ if (string == NULL)
+ return NULL;
+ jsize len = JvGetStringUTFLength (string);
char *r = (char *) _Jv_Malloc (len + 1);
- JvGetStringUTFRegion (string, 0, len, r);
+ JvGetStringUTFRegion (string, 0, string->length(), r);
r[len] = '\0';
if (isCopy)
function = _Jv_FindSymbolInExecutable (buf + 1);
}
}
-#else /* WIN32 */
- args_size; /* Dummy statement to avoid unused parameter warning */
-#endif /* ! WIN32 */
+#endif /* WIN32 */
if (function == NULL)
{
return 0;
}
-JNIEXPORT jint JNICALL
+jint JNICALL
JNI_GetDefaultJavaVMInitArgs (void *args)
{
jint version = * (jint *) args;
return 0;
}
-JNIEXPORT jint JNICALL
+jint JNICALL
JNI_CreateJavaVM (JavaVM **vm, void **penv, void *args)
{
JvAssert (! the_vm);
return 0;
}
-JNIEXPORT jint JNICALL
+jint JNICALL
JNI_GetCreatedJavaVMs (JavaVM **vm_buffer, jsize buf_len, jsize *n_vms)
{
if (buf_len <= 0)