Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
michael@0 | 1 | // A collection of macros to simplify getting class and method references from Java. |
michael@0 | 2 | |
michael@0 | 3 | #define initInit() jclass jClass |
michael@0 | 4 | |
michael@0 | 5 | // note that this also sets jClass |
michael@0 | 6 | #define getClassGlobalRef(cname) \ |
michael@0 | 7 | (jClass = AndroidBridge::GetClassGlobalRef(jEnv, cname)) |
michael@0 | 8 | |
michael@0 | 9 | #define getField(fname, ftype) \ |
michael@0 | 10 | AndroidBridge::GetFieldID(jEnv, jClass, fname, ftype) |
michael@0 | 11 | |
michael@0 | 12 | #define getMethod(fname, ftype) \ |
michael@0 | 13 | AndroidBridge::GetMethodID(jEnv, jClass, fname, ftype) |
michael@0 | 14 | |
michael@0 | 15 | #define getStaticField(fname, ftype) \ |
michael@0 | 16 | AndroidBridge::GetStaticFieldID(jEnv, jClass, fname, ftype) |
michael@0 | 17 | |
michael@0 | 18 | #define getStaticMethod(fname, ftype) \ |
michael@0 | 19 | AndroidBridge::GetStaticMethodID(jEnv, jClass, fname, ftype) |
michael@0 | 20 | |
michael@0 | 21 | #ifndef ALOG |
michael@0 | 22 | #if defined(DEBUG) || defined(FORCE_ALOG) |
michael@0 | 23 | #define ALOG(args...) __android_log_print(ANDROID_LOG_INFO, "Gecko" , ## args) |
michael@0 | 24 | #else |
michael@0 | 25 | #define ALOG(args...) ((void)0) |
michael@0 | 26 | #endif |
michael@0 | 27 | #endif |
michael@0 | 28 | |
michael@0 | 29 | #ifdef DEBUG |
michael@0 | 30 | #define ALOG_BRIDGE(args...) ALOG(args) |
michael@0 | 31 | #else |
michael@0 | 32 | #define ALOG_BRIDGE(args...) ((void)0) |
michael@0 | 33 | #endif |