jni.cc (_Jv_JNI_GetAnyMethodID): Rewrite signature from external to internal representation.
* jni.cc (_Jv_JNI_GetAnyMethodID): Rewrite signature from external to internal representation. (_Jv_JNI_GetAnyFieldID): Likewise. Also, only use _Jv_FindClassFromSignature. From-SVN: r39289
This commit is contained in:
parent
45291dd585
commit
f86f42a8ff
|
@ -1,3 +1,10 @@
|
||||||
|
2001-01-26 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* jni.cc (_Jv_JNI_GetAnyMethodID): Rewrite signature from external
|
||||||
|
to internal representation.
|
||||||
|
(_Jv_JNI_GetAnyFieldID): Likewise. Also, only use
|
||||||
|
_Jv_FindClassFromSignature.
|
||||||
|
|
||||||
2001-01-26 Warren Levy <warrenl@redhat.com>
|
2001-01-26 Warren Levy <warrenl@redhat.com>
|
||||||
|
|
||||||
* java/lang/natSystem.cc (getSystemTimeZone): Only use tm_gmtoff
|
* java/lang/natSystem.cc (getSystemTimeZone): Only use tm_gmtoff
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// jni.cc - JNI implementation, including the jump table.
|
// jni.cc - JNI implementation, including the jump table.
|
||||||
|
|
||||||
/* Copyright (C) 1998, 1999, 2000 Free Software Foundation
|
/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation
|
||||||
|
|
||||||
This file is part of libgcj.
|
This file is part of libgcj.
|
||||||
|
|
||||||
|
@ -593,7 +593,13 @@ _Jv_JNI_GetAnyMethodID (JNIEnv *env, jclass clazz,
|
||||||
_Jv_InitClass (clazz);
|
_Jv_InitClass (clazz);
|
||||||
|
|
||||||
_Jv_Utf8Const *name_u = _Jv_makeUtf8Const ((char *) name, -1);
|
_Jv_Utf8Const *name_u = _Jv_makeUtf8Const ((char *) name, -1);
|
||||||
_Jv_Utf8Const *sig_u = _Jv_makeUtf8Const ((char *) sig, -1);
|
|
||||||
|
// FIXME: assume that SIG isn't too long.
|
||||||
|
int len = strlen (sig);
|
||||||
|
char s[len + 1];
|
||||||
|
for (int i = 0; i <= len; ++i)
|
||||||
|
s[i] = (sig[i] == '/') ? '.' : sig[i];
|
||||||
|
_Jv_Utf8Const *sig_u = _Jv_makeUtf8Const ((char *) s, -1);
|
||||||
|
|
||||||
JvAssert (! clazz->isPrimitive());
|
JvAssert (! clazz->isPrimitive());
|
||||||
|
|
||||||
|
@ -1053,14 +1059,12 @@ _Jv_JNI_GetAnyFieldID (JNIEnv *env, jclass clazz,
|
||||||
|
|
||||||
_Jv_Utf8Const *a_name = _Jv_makeUtf8Const ((char *) name, -1);
|
_Jv_Utf8Const *a_name = _Jv_makeUtf8Const ((char *) name, -1);
|
||||||
|
|
||||||
jclass field_class = NULL;
|
// FIXME: assume that SIG isn't too long.
|
||||||
if (sig[0] == '[')
|
int len = strlen (sig);
|
||||||
field_class = _Jv_FindClassFromSignature ((char *) sig, NULL);
|
char s[len + 1];
|
||||||
else
|
for (int i = 0; i <= len; ++i)
|
||||||
{
|
s[i] = (sig[i] == '/') ? '.' : sig[i];
|
||||||
_Jv_Utf8Const *sig_u = _Jv_makeUtf8Const ((char *) sig, -1);
|
jclass field_class = _Jv_FindClassFromSignature ((char *) s, NULL);
|
||||||
field_class = _Jv_FindClass (sig_u, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
// FIXME: what if field_class == NULL?
|
// FIXME: what if field_class == NULL?
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue