summaryrefslogtreecommitdiffstats
path: root/luni/src/main/native/BidiWrapper.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2010-05-20 20:54:45 -0700
committerElliott Hughes <enh@google.com>2010-05-20 20:54:45 -0700
commitebca53a204302c5e559b5c2c9014b48048faf4d4 (patch)
tree799ecee95c8a34f917ceb18a4d673894418e5502 /luni/src/main/native/BidiWrapper.cpp
parent40679a19b5de44363aa3f68d77cc13a74b41ffd6 (diff)
downloadlibcore-ebca53a204302c5e559b5c2c9014b48048faf4d4.zip
libcore-ebca53a204302c5e559b5c2c9014b48048faf4d4.tar.gz
libcore-ebca53a204302c5e559b5c2c9014b48048faf4d4.tar.bz2
Add write-back ScopedPrimitiveArrays (and use them).
I've left the remaining Get/Release Critical calls in "NativeConverter.cpp" for the next patch, even though getting into position to fix them is part of the point of this patch. Change-Id: I99e15a3cf3919008343ae4dc856c86ced233e07a
Diffstat (limited to 'luni/src/main/native/BidiWrapper.cpp')
-rw-r--r--luni/src/main/native/BidiWrapper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/luni/src/main/native/BidiWrapper.cpp b/luni/src/main/native/BidiWrapper.cpp
index 2811bc7..59dcfaa 100644
--- a/luni/src/main/native/BidiWrapper.cpp
+++ b/luni/src/main/native/BidiWrapper.cpp
@@ -80,7 +80,7 @@ static void BidiWrapper_ubidi_setPara(JNIEnv* env, jclass, jlong ptr, jcharArray
data->setEmbeddingLevels(NULL);
}
UErrorCode err = U_ZERO_ERROR;
- ScopedCharArray chars(env, text);
+ ScopedCharArrayRO chars(env, text);
ubidi_setPara(data->uBiDi(), chars.get(), length, paraLevel, data->embeddingLevels(), &err);
icu4jni_error(env, err);
}
@@ -151,7 +151,7 @@ static jobjectArray BidiWrapper_ubidi_getRuns(JNIEnv* env, jclass, jlong ptr) {
}
static jintArray BidiWrapper_ubidi_reorderVisual(JNIEnv* env, jclass, jbyteArray javaLevels, jint length) {
- ScopedByteArray levelBytes(env, javaLevels);
+ ScopedByteArrayRO levelBytes(env, javaLevels);
const UBiDiLevel* levels = reinterpret_cast<const UBiDiLevel*>(levelBytes.get());
UniquePtr<int[]> indexMap(new int[length]);