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

Unified Diff: ppapi/generators/idl_c_header.py

Issue 7751001: More multi-version support (part 2) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | ppapi/generators/idl_c_proto.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/generators/idl_c_header.py
===================================================================
--- ppapi/generators/idl_c_header.py (revision 98271)
+++ ppapi/generators/idl_c_header.py (working copy)
@@ -167,15 +167,14 @@
macro = node.GetProperty('macro')
if not macro:
macro = self.GetMacro(node)
- label = node.GetLabel()
- if label:
- for vers in label.versions:
- strver = str(vers).replace('.', '_')
- idefs += self.GetDefine('%s_%s' % (macro, strver),
- '"%s;%s"' % (name, vers))
- if label.GetRelease(vers) == releases[-1]:
- idefs += self.GetDefine(macro, '%s_%s' % (macro, strver))
- idefs += '\n'
+
+ unique = node.GetUniqueReleases(releases)
+ for rel in unique:
+ version = node.GetVersion(rel)
+ strver = str(version).replace('.', '_')
+ idefs += self.GetDefine('%s_%s' % (macro, strver),
+ '"%s;%s"' % (name, version))
+ idefs += self.GetDefine(macro, '%s_%s' % (macro, strver)) + '\n'
out.Write(idefs)
# Generate the @file comment
« no previous file with comments | « no previous file | ppapi/generators/idl_c_proto.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698