Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: webrtc/sdk/android/src/jni/jni_helpers.h

Issue 2998403002: Android: Update convenience macro defining JNI-accessible methods (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/sdk/android/src/jni/jni_helpers.h
diff --git a/webrtc/sdk/android/src/jni/jni_helpers.h b/webrtc/sdk/android/src/jni/jni_helpers.h
index e4c43a25bf2396ead2de0b449082df4f253b4759..7400d3218a29058ab5af7c3af945d1920e2a3c25 100644
--- a/webrtc/sdk/android/src/jni/jni_helpers.h
+++ b/webrtc/sdk/android/src/jni/jni_helpers.h
@@ -36,20 +36,8 @@
// Convenience macro defining JNI-accessible methods in the org.webrtc package.
// Eliminates unnecessary boilerplate and line-wraps, reducing visual clutter.
-//
-// TODO(deadbeef): Rename this macro to something like
-// "JNI_FUNCTION_DECLARATION", and use variable length arguments, such that you
-// can write:
-//
-// JNI_FUNCTION_DECLARATION(void, nativeFoo, Type arg1, Type arg2) { ...
-//
-// Instead of:
-//
-// JNI_FUNCTION_DECLARATION(void, nativeFoo)(Type arg1, Type arg2) { ...
-//
-// The latter gets handled poorly by autoformatting tools.
-#define JOW(rettype, name) \
- extern "C" JNIEXPORT rettype JNICALL Java_org_webrtc_##name
+#define JNI_FUNCTION_DECLARATION(rettype, name, ...) \
+ extern "C" JNIEXPORT rettype JNICALL Java_org_webrtc_##name(__VA_ARGS__)
namespace webrtc_jni {
« no previous file with comments | « webrtc/sdk/android/src/jni/androidvideotracksource_jni.cc ('k') | webrtc/sdk/android/src/jni/pc/androidnetworkmonitor_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698