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

Unified Diff: ppapi/generators/idl_outfile.py

Issue 8983022: Tweak the PPAPI IDL generator to wrap the generated-from comment if necessary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebbbase Created 8 years, 12 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 | « ppapi/generators/idl_c_header.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/generators/idl_outfile.py
diff --git a/ppapi/generators/idl_outfile.py b/ppapi/generators/idl_outfile.py
index 434cfa0990eabfa359b0c73902f062eb99f759ba..363d86538b4ac2a47fa97f3f6097c5800b9758ec 100644
--- a/ppapi/generators/idl_outfile.py
+++ b/ppapi/generators/idl_outfile.py
@@ -36,14 +36,15 @@ def IsEquivelent(intext, outtext):
outwords = outline.split()
if not inwords or not outwords: return False
- if inwords[0] != outwords[0] or inwords[0] != '/*': return False
+ if inwords[0] != outwords[0] or inwords[0] not in ('/*', '*'): return False
# Neither the year, nor the modified date need an exact match
if inwords[1] == 'Copyright':
if inwords[4:] == outwords[4:]: continue
- elif inwords[1] == 'From':
- if inwords[0:4] == outwords[0:4]:
- continue
+ elif inwords[1] == 'From': # Un-wrapped modified date.
+ if inwords[0:4] == outwords[0:4]: continue
+ elif inwords[1] == 'modified': # Wrapped modified date.
+ if inwords[0:2] == outwords[0:2]: continue
return False
return True
@@ -173,4 +174,3 @@ if __name__ == '__main__':
os.remove(filename)
if not errors: InfoOut.Log('All tests pass.')
sys.exit(errors)
-
« no previous file with comments | « ppapi/generators/idl_c_header.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698