Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect ReleasePrimitiveArrayCritical jni call #46

Merged
merged 1 commit into from
Aug 19, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/jni/net_jpountz_lz4_LZ4JNI.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ JNIEXPORT jint JNICALL Java_net_jpountz_lz4_LZ4JNI_LZ4_1compress_1limitedOutput
compressed = LZ4_compress_limitedOutput(in + srcOff, out + destOff, srcLen, maxDestLen);

(*env)->ReleasePrimitiveArrayCritical(env, src, in, 0);
(*env)->ReleasePrimitiveArrayCritical(env, src, out, 0);
(*env)->ReleasePrimitiveArrayCritical(env, dest, out, 0);

return compressed;

Expand Down Expand Up @@ -89,7 +89,7 @@ JNIEXPORT jint JNICALL Java_net_jpountz_lz4_LZ4JNI_LZ4_1compressHC
compressed = LZ4_compressHC_limitedOutput(in + srcOff, out + destOff, srcLen, maxDestLen);

(*env)->ReleasePrimitiveArrayCritical(env, src, in, 0);
(*env)->ReleasePrimitiveArrayCritical(env, src, out, 0);
(*env)->ReleasePrimitiveArrayCritical(env, dest, out, 0);

return compressed;

Expand Down Expand Up @@ -121,7 +121,7 @@ JNIEXPORT jint JNICALL Java_net_jpountz_lz4_LZ4JNI_LZ4_1decompress_1fast
compressed = LZ4_decompress_fast(in + srcOff, out + destOff, destLen);

(*env)->ReleasePrimitiveArrayCritical(env, src, in, 0);
(*env)->ReleasePrimitiveArrayCritical(env, src, out, 0);
(*env)->ReleasePrimitiveArrayCritical(env, dest, out, 0);

return compressed;

Expand Down Expand Up @@ -153,7 +153,7 @@ JNIEXPORT jint JNICALL Java_net_jpountz_lz4_LZ4JNI_LZ4_1decompress_1safe
decompressed = LZ4_decompress_safe(in + srcOff, out + destOff, srcLen, maxDestLen);

(*env)->ReleasePrimitiveArrayCritical(env, src, in, 0);
(*env)->ReleasePrimitiveArrayCritical(env, src, out, 0);
(*env)->ReleasePrimitiveArrayCritical(env, dest, out, 0);

return decompressed;

Expand Down Expand Up @@ -185,7 +185,7 @@ JNIEXPORT jint JNICALL Java_net_jpountz_lz4_LZ4JNI_LZ4_1decompress_1fast_1withPr
compressed = LZ4_decompress_fast_withPrefix64k(in + srcOff, out + destOff, destLen);

(*env)->ReleasePrimitiveArrayCritical(env, src, in, 0);
(*env)->ReleasePrimitiveArrayCritical(env, src, out, 0);
(*env)->ReleasePrimitiveArrayCritical(env, dest, out, 0);

return compressed;

Expand Down Expand Up @@ -217,7 +217,7 @@ JNIEXPORT jint JNICALL Java_net_jpountz_lz4_LZ4JNI_LZ4_1decompress_1safe_1withPr
decompressed = LZ4_decompress_safe_withPrefix64k(in + srcOff, out + destOff, srcLen, maxDestLen);

(*env)->ReleasePrimitiveArrayCritical(env, src, in, 0);
(*env)->ReleasePrimitiveArrayCritical(env, src, out, 0);
(*env)->ReleasePrimitiveArrayCritical(env, dest, out, 0);

return decompressed;

Expand Down