From facf8a56d2b2c685e63b2f5c7d8f1ada497c9895 Mon Sep 17 00:00:00 2001 From: Marc Horowitz Date: Fri, 20 Nov 2015 12:17:00 -0800 Subject: [PATCH] minor build cleanups Summary: make DevSupportManager PUBLIC visibility, instead of adding to it more; put private parts of OnLoad into an anonymous namespace, and move NativeRunnable into it; don't make NativeArray depend on MethodCall which it does not use. public Reviewed By: astreet Differential Revision: D2651270 fb-gh-sync-id: d5262da79cbd60c4eb490d43d13cc625fa163cdf --- ReactAndroid/src/main/jni/react/jni/NativeArray.h | 2 +- ReactAndroid/src/main/jni/react/jni/OnLoad.cpp | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ReactAndroid/src/main/jni/react/jni/NativeArray.h b/ReactAndroid/src/main/jni/react/jni/NativeArray.h index 452f6b1d0..f30ef107d 100644 --- a/ReactAndroid/src/main/jni/react/jni/NativeArray.h +++ b/ReactAndroid/src/main/jni/react/jni/NativeArray.h @@ -3,7 +3,7 @@ #pragma once #include -#include +#include namespace facebook { namespace react { diff --git a/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp b/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp index 6d3a1c2d8..e3ceddd5f 100644 --- a/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp +++ b/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp @@ -60,10 +60,6 @@ struct ReadableNativeMapKeySetIterator : public Countable { , mapRef(mapRef_) {} }; -struct NativeRunnable : public Countable { - std::function callable; -}; - static jobject createReadableNativeMapWithContents(JNIEnv* env, folly::dynamic map) { if (map.isNull()) { return nullptr; @@ -515,8 +511,14 @@ static jstring getNextKey(JNIEnv* env, jobject obj) { } // namespace iterator } // namespace map +namespace { + namespace runnable { +struct NativeRunnable : public Countable { + std::function callable; +}; + static jclass gNativeRunnableClass; static jmethodID gNativeRunnableCtor; @@ -743,6 +745,8 @@ static void createProxyExecutor(JNIEnv *env, jobject obj, jobject executorInstan } // namespace executors +} + extern "C" JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) { return initialize(vm, [] { // get the current env