summaryrefslogtreecommitdiffstats
path: root/ppapi/generators/idl_outfile.py
diff options
context:
space:
mode:
authorwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-04 21:57:04 +0000
committerwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-04 21:57:04 +0000
commitdbf21cc6203bfef5ce4dc7a9df4ce2f486445dd2 (patch)
tree5ec56f65866e62e8d0090b26e2e224de72729731 /ppapi/generators/idl_outfile.py
parent0158ee76f6ec8a8223de6ea62850d83a2ee98003 (diff)
downloadchromium_src-dbf21cc6203bfef5ce4dc7a9df4ce2f486445dd2.zip
chromium_src-dbf21cc6203bfef5ce4dc7a9df4ce2f486445dd2.tar.gz
chromium_src-dbf21cc6203bfef5ce4dc7a9df4ce2f486445dd2.tar.bz2
Tweak the PPAPI IDL generator to wrap the generated-from comment if necessary.
BUG=109129 Review URL: http://codereview.chromium.org/8983022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116391 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/generators/idl_outfile.py')
-rw-r--r--ppapi/generators/idl_outfile.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/ppapi/generators/idl_outfile.py b/ppapi/generators/idl_outfile.py
index 434cfa0..a747d7d 100644
--- a/ppapi/generators/idl_outfile.py
+++ b/ppapi/generators/idl_outfile.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
#
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -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)
-