summaryrefslogtreecommitdiff
path: root/src/java_lang_System.cc
diff options
context:
space:
mode:
author Elliott Hughes <enh@google.com> 2012-03-15 22:10:52 -0700
committer Elliott Hughes <enh@google.com> 2012-03-15 22:10:52 -0700
commit0512f02dd6623c0870c11fbf3274d7462f732136 (patch)
treec90b32c42b285d3cea45272601b5cf007b4ea264 /src/java_lang_System.cc
parent88c5c355fc3d881f905564911d746b2313d5fc89 (diff)
Remove anonymous namespaces.
No one likes them and we're pretty inconsistent at using them. We're much better with 'static'. Change-Id: I65eeffd0fb60633edca30923af0caedb06a0105d
Diffstat (limited to 'src/java_lang_System.cc')
-rw-r--r--src/java_lang_System.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/java_lang_System.cc b/src/java_lang_System.cc
index 22a9cc6832..fa8257b8c1 100644
--- a/src/java_lang_System.cc
+++ b/src/java_lang_System.cc
@@ -102,15 +102,13 @@ static void move32(void* dst, const void* src, size_t n) {
namespace art {
-namespace {
-
-void ThrowArrayStoreException_NotAnArray(const char* identifier, Object* array) {
+static void ThrowArrayStoreException_NotAnArray(const char* identifier, Object* array) {
std::string actualType(PrettyTypeOf(array));
Thread::Current()->ThrowNewExceptionF("Ljava/lang/ArrayStoreException;",
"%s of type %s is not an array", identifier, actualType.c_str());
}
-void System_arraycopy(JNIEnv* env, jclass, jobject javaSrc, jint srcPos, jobject javaDst, jint dstPos, jint length) {
+static void System_arraycopy(JNIEnv* env, jclass, jobject javaSrc, jint srcPos, jobject javaDst, jint dstPos, jint length) {
ScopedThreadStateChange tsc(Thread::Current(), Thread::kRunnable);
Thread* self = Thread::Current();
@@ -244,18 +242,16 @@ void System_arraycopy(JNIEnv* env, jclass, jobject javaSrc, jint srcPos, jobject
}
}
-jint System_identityHashCode(JNIEnv* env, jclass, jobject javaObject) {
+static jint System_identityHashCode(JNIEnv* env, jclass, jobject javaObject) {
Object* o = Decode<Object*>(env, javaObject);
return static_cast<jint>(reinterpret_cast<uintptr_t>(o));
}
-JNINativeMethod gMethods[] = {
+static JNINativeMethod gMethods[] = {
NATIVE_METHOD(System, arraycopy, "(Ljava/lang/Object;ILjava/lang/Object;II)V"),
NATIVE_METHOD(System, identityHashCode, "(Ljava/lang/Object;)I"),
};
-} // namespace
-
void register_java_lang_System(JNIEnv* env) {
jniRegisterNativeMethods(env, "java/lang/System", gMethods, NELEM(gMethods));
}