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

Unified Diff: ppapi/generators/idl_c_proto.py

Issue 23569005: Add PPAPI interfaces for platform verification. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments. Created 7 years, 3 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: ppapi/generators/idl_c_proto.py
diff --git a/ppapi/generators/idl_c_proto.py b/ppapi/generators/idl_c_proto.py
index 2989a09afd449d61ba81780f1a3a1984720b30ce..fe00fc1f47494d215ccaf85fc6d763c0eb55378c 100755
--- a/ppapi/generators/idl_c_proto.py
+++ b/ppapi/generators/idl_c_proto.py
@@ -609,6 +609,18 @@ class CGen(object):
if len(line) <= 80:
lines.append(line.rstrip())
else:
+ # URLs are permitted to be over 80 chars by the style guide.
+ if 'http' in line:
ddorwin 2013/09/07 04:31:43 minor issue: Should we create a new line if 'http'
ddorwin 2013/09/07 04:31:43 Should we combine this if with the one above? If
DaleCurtis 2013/09/09 20:49:14 There are a lot of cases here that aren't handled;
DaleCurtis 2013/09/09 20:49:14 Done; though now space_break is always computed.
+ lines.append(line)
+ continue
+
+ # Break long typedefs on nearest space.
+ space_break = line.rfind(' ', 0, 80)
+ if not '(' in line and space_break >= 0:
+ lines.append(line[0:space_break])
+ lines.append(' ' + line[space_break + 1:])
+ continue
+
left = line.rfind('(') + 1
args = line[left:].split(',')
orig_args = args

Powered by Google App Engine
This is Rietveld 408576698