diff options
author | Elliott Hughes <enh@google.com> | 2010-04-16 17:44:12 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2010-04-16 17:44:12 -0700 |
commit | c08f9fb2a3be82bb1a3f477ca1524ddcf7a1d4b8 (patch) | |
tree | cc325048a7dc4cb15eb2f39244c3b881b284644d /icu/src/main/native | |
parent | 757a7942eed2b0aa457f8517a0259d2ac82c5b18 (diff) | |
download | libcore-c08f9fb2a3be82bb1a3f477ca1524ddcf7a1d4b8.zip libcore-c08f9fb2a3be82bb1a3f477ca1524ddcf7a1d4b8.tar.gz libcore-c08f9fb2a3be82bb1a3f477ca1524ddcf7a1d4b8.tar.bz2 |
Move the libcore registration out of libnativehelpers and into libcore.
Bug: 754114
Change-Id: Iaa03def509c10cbaa12fd2128584b93d4be4a6b7
Diffstat (limited to 'icu/src/main/native')
-rw-r--r-- | icu/src/main/native/BidiWrapper.cpp | 2 | ||||
-rw-r--r-- | icu/src/main/native/ICU.cpp | 4 | ||||
-rw-r--r-- | icu/src/main/native/NativeBreakIterator.cpp | 1 | ||||
-rw-r--r-- | icu/src/main/native/NativeCollation.cpp | 3 | ||||
-rw-r--r-- | icu/src/main/native/NativeConverter.cpp | 10 | ||||
-rw-r--r-- | icu/src/main/native/NativeDecimalFormat.cpp | 5 | ||||
-rw-r--r-- | icu/src/main/native/NativeIDN.cpp | 2 | ||||
-rw-r--r-- | icu/src/main/native/NativeNormalizer.cpp | 7 | ||||
-rw-r--r-- | icu/src/main/native/NativeRegEx.cpp | 2 | ||||
-rw-r--r-- | icu/src/main/native/UCharacter.cpp | 7 |
10 files changed, 10 insertions, 33 deletions
diff --git a/icu/src/main/native/BidiWrapper.cpp b/icu/src/main/native/BidiWrapper.cpp index 7a25ff1..03efa92 100644 --- a/icu/src/main/native/BidiWrapper.cpp +++ b/icu/src/main/native/BidiWrapper.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ #define LOG_TAG "BidiWrapper" -#include "AndroidSystemNatives.h" + #include <JNIHelp.h> #include "ErrorCode.h" #include "UniquePtr.h" diff --git a/icu/src/main/native/ICU.cpp b/icu/src/main/native/ICU.cpp index 3066edb..1517932 100644 --- a/icu/src/main/native/ICU.cpp +++ b/icu/src/main/native/ICU.cpp @@ -15,8 +15,8 @@ */ #define LOG_TAG "ICU" + #include "JNIHelp.h" -#include "AndroidSystemNatives.h" #include "ScopedUtfChars.h" #include "UniquePtr.h" #include "cutils/log.h" @@ -679,7 +679,6 @@ static jboolean initLocaleDataImpl(JNIEnv* env, jclass, jstring locale, jobject } static JNINativeMethod gMethods[] = { - /* name, signature, funcPtr */ {"getAvailableBreakIteratorLocalesNative", "()[Ljava/lang/String;", (void*) getAvailableBreakIteratorLocalesNative}, {"getAvailableCalendarLocalesNative", "()[Ljava/lang/String;", (void*) getAvailableCalendarLocalesNative}, {"getAvailableCollatorLocalesNative", "()[Ljava/lang/String;", (void*) getAvailableCollatorLocalesNative}, @@ -700,7 +699,6 @@ static JNINativeMethod gMethods[] = { {"getTimeZonesNative", "([[Ljava/lang/String;Ljava/lang/String;)V", (void*) getTimeZonesNative}, {"initLocaleDataImpl", "(Ljava/lang/String;Lcom/ibm/icu4jni/util/LocaleData;)Z", (void*) initLocaleDataImpl}, }; - int register_com_ibm_icu4jni_util_Resources(JNIEnv* env) { jclass stringclass = env->FindClass("java/lang/String"); if (stringclass == NULL) { diff --git a/icu/src/main/native/NativeBreakIterator.cpp b/icu/src/main/native/NativeBreakIterator.cpp index 5b12ba3..85ada2d 100644 --- a/icu/src/main/native/NativeBreakIterator.cpp +++ b/icu/src/main/native/NativeBreakIterator.cpp @@ -17,7 +17,6 @@ #define LOG_TAG "NativeBreakIterator" #include "JNIHelp.h" -#include "AndroidSystemNatives.h" #include "ErrorCode.h" #include "ScopedUtfChars.h" #include "unicode/ubrk.h" diff --git a/icu/src/main/native/NativeCollation.cpp b/icu/src/main/native/NativeCollation.cpp index 5bc7749..263a525 100644 --- a/icu/src/main/native/NativeCollation.cpp +++ b/icu/src/main/native/NativeCollation.cpp @@ -10,7 +10,6 @@ #define LOG_TAG "NativeCollation" #include "JNIHelp.h" -#include "AndroidSystemNatives.h" #include "ErrorCode.h" #include "unicode/ucol.h" #include "unicode/ucoleitr.h" @@ -499,7 +498,6 @@ static void setText(JNIEnv *env, jclass obj, jint address, } static JNINativeMethod gMethods[] = { - /* name, signature, funcPtr */ { "openCollator", "()I", (void*) openCollator__ }, { "openCollator", "(Ljava/lang/String;)I", (void*) openCollator__Ljava_lang_String_2 }, { "openCollatorFromRules", "(Ljava/lang/String;II)I", (void*) openCollatorFromRules }, @@ -523,7 +521,6 @@ static JNINativeMethod gMethods[] = { { "getOffset", "(I)I", (void*) getOffset }, { "setOffset", "(II)V", (void*) setOffset } }; - int register_com_ibm_icu4jni_text_NativeCollator(JNIEnv *_env) { return jniRegisterNativeMethods(_env, "com/ibm/icu4jni/text/NativeCollation", gMethods, NELEM(gMethods)); diff --git a/icu/src/main/native/NativeConverter.cpp b/icu/src/main/native/NativeConverter.cpp index f227f3d..8cc6d15 100644 --- a/icu/src/main/native/NativeConverter.cpp +++ b/icu/src/main/native/NativeConverter.cpp @@ -17,7 +17,6 @@ #define LOG_TAG "NativeConverter" -#include "AndroidSystemNatives.h" #include "ErrorCode.h" #include "JNIHelp.h" #include "ScopedUtfChars.h" @@ -989,11 +988,7 @@ static jobject charsetForName(JNIEnv* env, jclass, jstring charsetName) { javaCanonicalName, env->NewStringUTF(icuCanonicalName), aliases); } -/* - * JNI registration - */ static JNINativeMethod gMethods[] = { - /* name, signature, funcPtr */ { "canEncode", "(JI)Z", (void*) canEncode }, { "charsetForName", "(Ljava/lang/String;)Ljava/nio/charset/Charset;", (void*) charsetForName }, { "closeConverter", "(J)V", (void*) closeConverter }, @@ -1017,8 +1012,7 @@ static JNINativeMethod gMethods[] = { { "setSubstitutionBytes", "(J[BI)I", (void*) setSubstitutionBytes }, { "setSubstitutionChars", "(J[CI)I", (void*) setSubstitutionChars }, }; - -int register_com_ibm_icu4jni_converters_NativeConverter(JNIEnv *_env) { - return jniRegisterNativeMethods(_env, "com/ibm/icu4jni/charset/NativeConverter", +int register_com_ibm_icu4jni_converters_NativeConverter(JNIEnv* env) { + return jniRegisterNativeMethods(env, "com/ibm/icu4jni/charset/NativeConverter", gMethods, NELEM(gMethods)); } diff --git a/icu/src/main/native/NativeDecimalFormat.cpp b/icu/src/main/native/NativeDecimalFormat.cpp index 6909553..8f39a39 100644 --- a/icu/src/main/native/NativeDecimalFormat.cpp +++ b/icu/src/main/native/NativeDecimalFormat.cpp @@ -17,7 +17,6 @@ #define LOG_TAG "NativeDecimalFormat" #include "JNIHelp.h" -#include "AndroidSystemNatives.h" #include "cutils/log.h" #include "unicode/unum.h" #include "unicode/numfmt.h" @@ -586,7 +585,6 @@ static jint cloneDecimalFormatImpl(JNIEnv *env, jclass, jint addr) { } static JNINativeMethod gMethods[] = { - /* name, signature, funcPtr */ {"applyPatternImpl", "(IZLjava/lang/String;)V", (void*) applyPatternImpl}, {"cloneDecimalFormatImpl", "(I)I", (void*) cloneDecimalFormatImpl}, {"closeDecimalFormatImpl", "(I)V", (void*) closeDecimalFormatImpl}, @@ -605,7 +603,6 @@ static JNINativeMethod gMethods[] = { {"toPatternImpl", "(IZ)Ljava/lang/String;", (void*) toPatternImpl}, }; int register_com_ibm_icu4jni_text_NativeDecimalFormat(JNIEnv* env) { - return jniRegisterNativeMethods(env, - "com/ibm/icu4jni/text/NativeDecimalFormat", gMethods, + return jniRegisterNativeMethods(env, "com/ibm/icu4jni/text/NativeDecimalFormat", gMethods, NELEM(gMethods)); } diff --git a/icu/src/main/native/NativeIDN.cpp b/icu/src/main/native/NativeIDN.cpp index 2b45dbe..e8052fc 100644 --- a/icu/src/main/native/NativeIDN.cpp +++ b/icu/src/main/native/NativeIDN.cpp @@ -61,6 +61,6 @@ static jstring convertImpl(JNIEnv* env, jclass, jstring s, jint flags, jboolean static JNINativeMethod gMethods[] = { {"convertImpl", "(Ljava/lang/String;IZ)Ljava/lang/String;", (void*) convertImpl}, }; -extern "C" int register_com_ibm_icu4jni_text_NativeIDN(JNIEnv* env) { +int register_com_ibm_icu4jni_text_NativeIDN(JNIEnv* env) { return jniRegisterNativeMethods(env, "com/ibm/icu4jni/text/NativeIDN", gMethods, NELEM(gMethods)); } diff --git a/icu/src/main/native/NativeNormalizer.cpp b/icu/src/main/native/NativeNormalizer.cpp index 663a7c1..257cf9b 100644 --- a/icu/src/main/native/NativeNormalizer.cpp +++ b/icu/src/main/native/NativeNormalizer.cpp @@ -41,11 +41,10 @@ static jboolean isNormalizedImpl(JNIEnv* env, jclass, jstring s, jint intMode) { } static JNINativeMethod gMethods[] = { - /* name, signature, funcPtr */ {"normalizeImpl", "(Ljava/lang/String;I)Ljava/lang/String;", (void*) normalizeImpl}, {"isNormalizedImpl", "(Ljava/lang/String;I)Z", (void*) isNormalizedImpl}, }; -extern "C" int register_com_ibm_icu4jni_text_NativeNormalizer(JNIEnv* env) { - return jniRegisterNativeMethods(env, - "com/ibm/icu4jni/text/NativeNormalizer", gMethods, NELEM(gMethods)); +int register_com_ibm_icu4jni_text_NativeNormalizer(JNIEnv* env) { + return jniRegisterNativeMethods(env, "com/ibm/icu4jni/text/NativeNormalizer", + gMethods, NELEM(gMethods)); } diff --git a/icu/src/main/native/NativeRegEx.cpp b/icu/src/main/native/NativeRegEx.cpp index f8be4ee..511f1e4 100644 --- a/icu/src/main/native/NativeRegEx.cpp +++ b/icu/src/main/native/NativeRegEx.cpp @@ -16,8 +16,6 @@ #define LOG_TAG "NativeRegEx" -#include "AndroidSystemNatives.h" - #include <stdlib.h> #include <stdio.h> #include <string.h> diff --git a/icu/src/main/native/UCharacter.cpp b/icu/src/main/native/UCharacter.cpp index 4186b75..1c5af48 100644 --- a/icu/src/main/native/UCharacter.cpp +++ b/icu/src/main/native/UCharacter.cpp @@ -15,8 +15,8 @@ */ #define LOG_TAG "UCharacter" + #include "JNIHelp.h" -#include "AndroidSystemNatives.h" #include "ScopedJavaUnicodeString.h" #include "ScopedUtfChars.h" #include "unicode/locid.h" @@ -171,11 +171,7 @@ static int ofImpl(JNIEnv*, jclass, jint codePoint) { return ublock_getCode(codePoint); } -/* - * JNI registration - */ static JNINativeMethod gMethods[] = { - /* name, signature, funcPtr */ { "digit", "(II)I", (void*) digitImpl }, { "forName", "(Ljava/lang/String;)I", (void*) forNameImpl }, { "getDirectionality", "(I)B", (void*) getDirectionalityImpl }, @@ -201,7 +197,6 @@ static JNINativeMethod gMethods[] = { { "toLowerCase", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", (void*) toLowerCaseStringImpl }, { "toUpperCase", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", (void*) toUpperCaseStringImpl }, }; - int register_com_ibm_icu4jni_lang_UCharacter(JNIEnv* env) { return jniRegisterNativeMethods(env, "com/ibm/icu4jni/lang/UCharacter", gMethods, NELEM(gMethods)); |