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

Unified Diff: base/android/jni_generator/jni_generator.py

Issue 277753004: Android: optimizes jni_generator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/jni_generator/jni_generator.py
diff --git a/base/android/jni_generator/jni_generator.py b/base/android/jni_generator/jni_generator.py
index 32d09f1b8dc1b48dd140a33fc81b2fd315857676..12df8cf7926ae873ca286e776c3b71fbcc2f30fe 100755
--- a/base/android/jni_generator/jni_generator.py
+++ b/base/android/jni_generator/jni_generator.py
@@ -359,11 +359,11 @@ def ExtractNatives(contents, ptr_type):
contents = contents.replace('\n', '')
natives = []
re_native = re.compile(r'(@NativeClassQualifiedName'
- '\(\"(?P<native_class_name>.*?)\"\))?\s*'
- '(@NativeCall(\(\"(?P<java_class_name>.*?)\"\)))?\s*'
- '(?P<qualifiers>\w+\s\w+|\w+|\s+)\s*?native '
- '(?P<return_type>\S*?) '
- '(?P<name>native\w+?)\((?P<params>.*?)\);')
+ '\(\"(?P<native_class_name>.*?)\"\)\s+)?'
+ '(@NativeCall(\(\"(?P<java_class_name>.*?)\"\))\s+)?'
+ '(?P<qualifiers>\w+\s\w+|\w+|\s+)\s*native '
+ '(?P<return_type>\S*) '
+ '(?P<name>native\w+)\((?P<params>.*?)\);')
for match in re.finditer(re_native, contents):
native = NativeMethod(
static='static' in match.group('qualifiers'),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698