@@ -85,7 +85,7 @@ static jfieldID JPEGHuffmanTable_valuesID;
8585/*
8686 * Defined in jpegdecoder.c. Copy code from there if and
8787 * when that disappears. */
88- extern JavaVM * jvm ;
88+ extern JavaVM * the_jvm ;
8989
9090/*
9191 * The following sets of defines must match the warning messages in the
@@ -557,7 +557,7 @@ sun_jpeg_output_message (j_common_ptr cinfo)
557557 char buffer [JMSG_LENGTH_MAX ];
558558 jstring string ;
559559 imageIODataPtr data = (imageIODataPtr ) cinfo -> client_data ;
560- JNIEnv * env = (JNIEnv * )JNU_GetEnv (jvm , JNI_VERSION_1_2 );
560+ JNIEnv * env = (JNIEnv * )JNU_GetEnv (the_jvm , JNI_VERSION_1_2 );
561561 jobject theObject ;
562562
563563 /* Create the message */
@@ -928,7 +928,7 @@ imageio_fill_input_buffer(j_decompress_ptr cinfo)
928928 struct jpeg_source_mgr * src = cinfo -> src ;
929929 imageIODataPtr data = (imageIODataPtr ) cinfo -> client_data ;
930930 streamBufferPtr sb = & data -> streamBuf ;
931- JNIEnv * env = (JNIEnv * )JNU_GetEnv (jvm , JNI_VERSION_1_2 );
931+ JNIEnv * env = (JNIEnv * )JNU_GetEnv (the_jvm , JNI_VERSION_1_2 );
932932 int ret ;
933933 jobject input = NULL ;
934934
@@ -1021,7 +1021,7 @@ imageio_fill_suspended_buffer(j_decompress_ptr cinfo)
10211021 struct jpeg_source_mgr * src = cinfo -> src ;
10221022 imageIODataPtr data = (imageIODataPtr ) cinfo -> client_data ;
10231023 streamBufferPtr sb = & data -> streamBuf ;
1024- JNIEnv * env = (JNIEnv * )JNU_GetEnv (jvm , JNI_VERSION_1_2 );
1024+ JNIEnv * env = (JNIEnv * )JNU_GetEnv (the_jvm , JNI_VERSION_1_2 );
10251025 jint ret ;
10261026 size_t offset , buflen ;
10271027 jobject input = NULL ;
@@ -1122,7 +1122,7 @@ imageio_skip_input_data(j_decompress_ptr cinfo, long num_bytes)
11221122 struct jpeg_source_mgr * src = cinfo -> src ;
11231123 imageIODataPtr data = (imageIODataPtr ) cinfo -> client_data ;
11241124 streamBufferPtr sb = & data -> streamBuf ;
1125- JNIEnv * env = (JNIEnv * )JNU_GetEnv (jvm , JNI_VERSION_1_2 );
1125+ JNIEnv * env = (JNIEnv * )JNU_GetEnv (the_jvm , JNI_VERSION_1_2 );
11261126 jlong ret ;
11271127 jobject reader ;
11281128 jobject input = NULL ;
@@ -1207,7 +1207,7 @@ imageio_term_source(j_decompress_ptr cinfo)
12071207 // To pushback, just seek back by src->bytes_in_buffer
12081208 struct jpeg_source_mgr * src = cinfo -> src ;
12091209 imageIODataPtr data = (imageIODataPtr ) cinfo -> client_data ;
1210- JNIEnv * env = (JNIEnv * )JNU_GetEnv (jvm , JNI_VERSION_1_2 );
1210+ JNIEnv * env = (JNIEnv * )JNU_GetEnv (the_jvm , JNI_VERSION_1_2 );
12111211 jobject reader = data -> imageIOobj ;
12121212 if (src -> bytes_in_buffer > 0 ) {
12131213 RELEASE_ARRAYS (env , data , src -> next_input_byte );
@@ -2369,7 +2369,7 @@ imageio_init_destination (j_compress_ptr cinfo)
23692369 struct jpeg_destination_mgr * dest = cinfo -> dest ;
23702370 imageIODataPtr data = (imageIODataPtr ) cinfo -> client_data ;
23712371 streamBufferPtr sb = & data -> streamBuf ;
2372- JNIEnv * env = (JNIEnv * )JNU_GetEnv (jvm , JNI_VERSION_1_2 );
2372+ JNIEnv * env = (JNIEnv * )JNU_GetEnv (the_jvm , JNI_VERSION_1_2 );
23732373
23742374 if (sb -> buf == NULL ) {
23752375 // We forgot to pin the array
@@ -2395,7 +2395,7 @@ imageio_empty_output_buffer (j_compress_ptr cinfo)
23952395 struct jpeg_destination_mgr * dest = cinfo -> dest ;
23962396 imageIODataPtr data = (imageIODataPtr ) cinfo -> client_data ;
23972397 streamBufferPtr sb = & data -> streamBuf ;
2398- JNIEnv * env = (JNIEnv * )JNU_GetEnv (jvm , JNI_VERSION_1_2 );
2398+ JNIEnv * env = (JNIEnv * )JNU_GetEnv (the_jvm , JNI_VERSION_1_2 );
23992399 jobject output = NULL ;
24002400
24012401 RELEASE_ARRAYS (env , data , (const JOCTET * )(dest -> next_output_byte ));
@@ -2431,7 +2431,7 @@ imageio_term_destination (j_compress_ptr cinfo)
24312431 struct jpeg_destination_mgr * dest = cinfo -> dest ;
24322432 imageIODataPtr data = (imageIODataPtr ) cinfo -> client_data ;
24332433 streamBufferPtr sb = & data -> streamBuf ;
2434- JNIEnv * env = (JNIEnv * )JNU_GetEnv (jvm , JNI_VERSION_1_2 );
2434+ JNIEnv * env = (JNIEnv * )JNU_GetEnv (the_jvm , JNI_VERSION_1_2 );
24352435
24362436 /* find out how much needs to be written */
24372437 /* this conversion from size_t to jint is safe, because the lenght of the buffer is limited by jint */
0 commit comments