summaryrefslogtreecommitdiffstats
path: root/ppapi/generators/idl_outfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi/generators/idl_outfile.py')
-rwxr-xr-xppapi/generators/idl_outfile.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/ppapi/generators/idl_outfile.py b/ppapi/generators/idl_outfile.py
index 053cf3e..f6a1627 100755
--- a/ppapi/generators/idl_outfile.py
+++ b/ppapi/generators/idl_outfile.py
@@ -54,6 +54,7 @@ class IDLOutFile(object):
curwords = curline.split()
oldwords = oldline.split()
+ # It wasn't a perfect match. Check for changes we should ignore.
# Unmatched lines must be the same length
if len(curwords) != len(oldwords):
return False
@@ -67,16 +68,19 @@ class IDLOutFile(object):
if len(curwords) > 4 and curwords[1] == 'Copyright':
if curwords[4:] == oldwords[4:]: continue
- # Ignore changes to auto generation timestamp when line unwrapped
+ # Ignore changes to auto generation timestamp.
# // From FILENAME.idl modified DAY MON DATE TIME YEAR.
# /* From FILENAME.idl modified DAY MON DATE TIME YEAR. */
- if len(curwords) > 8 and curwords[1] == 'From':
+ # The line may be wrapped, so first deal with the first "From" line.
+ if curwords[1] == 'From':
if curwords[0:4] == oldwords[0:4]: continue
# Ignore changes to auto generation timestamp when line is wrapped
- # * modified DAY MON DATE TIME YEAR.
- if len(curwords) > 6 and curwords[1] == 'modified':
- continue
+ if index > 0:
+ two_line_oldwords = oldlines[index - 1].split() + oldwords[1:]
+ two_line_curwords = curlines[index - 1].split() + curwords[1:]
+ if len(two_line_curwords) > 8 and two_line_curwords[1] == 'From':
+ if two_line_curwords[0:4] == two_line_oldwords[0:4]: continue
return False
return True