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

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

Issue 10850030: Do not wrap preprocessor lines in the generated JNI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add unit test. Created 8 years, 5 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 | base/android/jni_generator/jni_generator_tests.py » ('j') | 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 02e22326d1e122f33f5cca4974c59a79a10f5e03..5cb052556fb7dfb31a1e09c48fcde98b25e9cc2e 100755
--- a/base/android/jni_generator/jni_generator.py
+++ b/base/android/jni_generator/jni_generator.py
@@ -880,7 +880,8 @@ jclass g_${JAVA_CLASS}_clazz = NULL;""")
def WrapOutput(output):
ret = []
for line in output.splitlines():
- if len(line) < 80:
+ # Do not wrap lines under 80 characters or preprocessor directives.
+ if len(line) < 80 or line.lstrip()[:1] == '#':
stripped = line.rstrip()
if len(ret) == 0 or len(ret[-1]) or len(stripped):
ret.append(stripped)
« no previous file with comments | « no previous file | base/android/jni_generator/jni_generator_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698