2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2025-04-09 17:31:09 +08:00

jni.cc (array_from_valist): Assume that jlong won't be promoted.

* jni.cc (array_from_valist): Assume that jlong won't be
	promoted.

From-SVN: r58859
This commit is contained in:
Tom Tromey 2002-11-06 14:14:51 +00:00 committed by Tom Tromey
parent ca01c43fca
commit 7694d69a1b
2 changed files with 13 additions and 2 deletions

@ -1,3 +1,8 @@
2002-11-06 Tom Tromey <tromey@redhat.com>
* jni.cc (array_from_valist): Assume that jlong won't be
promoted.
2002-11-04 R. A. Rivas Diaz <rivasdiaz@yahoo.com>
* gnu/java/security/provider/SHA.java (engineGetDigestLength):

@ -693,7 +693,13 @@ array_from_valist (jvalue *values, JArray<jclass> *arg_types, va_list vargs)
{
// Here we assume that sizeof(int) >= sizeof(jint), because we
// use `int' when decoding the varargs. Likewise for
// long/jlong, float, and double.
// float, and double. Also we assume that sizeof(jlong) >=
// sizeof(int), i.e. that jlong values are not further
// promoted.
JvAssert (sizeof (int) >= sizeof (jint));
JvAssert (sizeof (jlong) >= sizeof (int));
JvAssert (sizeof (double) >= sizeof (jfloat));
JvAssert (sizeof (double) >= sizeof (jdouble));
if (arg_elts[i] == JvPrimClass (byte))
values[i].b = (jbyte) va_arg (vargs, int);
else if (arg_elts[i] == JvPrimClass (short))
@ -701,7 +707,7 @@ array_from_valist (jvalue *values, JArray<jclass> *arg_types, va_list vargs)
else if (arg_elts[i] == JvPrimClass (int))
values[i].i = (jint) va_arg (vargs, int);
else if (arg_elts[i] == JvPrimClass (long))
values[i].j = (jlong) va_arg (vargs, long);
values[i].j = (jlong) va_arg (vargs, jlong);
else if (arg_elts[i] == JvPrimClass (float))
values[i].f = (jfloat) va_arg (vargs, double);
else if (arg_elts[i] == JvPrimClass (double))