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

Unified Diff: ppapi/generators/idl_c_proto.py

Issue 7477056: Add base class for generators (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 | « ppapi/generators/idl_c_header.py ('k') | ppapi/generators/idl_generator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/generators/idl_c_proto.py
===================================================================
--- ppapi/generators/idl_c_proto.py (revision 97201)
+++ ppapi/generators/idl_c_proto.py (working copy)
@@ -105,13 +105,13 @@
self.dbg_depth = 0
self.vmin = 0.0
self.vmax = 1e100
- self.release = 'M14'
+ self.release = GetOption('release')
def SetVersionMap(self, node):
self.vmin = 0.0
self.vmax = 1e100
for version in node.GetListOf('LabelItem'):
- if version.GetName() == GetOption('version'):
+ if version.GetName() == GetOption('release'):
self.vmin = float(version.GetProperty('VALUE'))
self.vmax = float(version.GetProperty('VALUE'))
@@ -385,7 +385,6 @@
def InterfaceDefs(self, node):
out = ''
- release = 'M14'
name = node.GetName()
macro = node.GetProperty('macro')
if not macro:
@@ -396,7 +395,7 @@
strver = str(vers).replace('.', '_')
out += self.GetDefine('%s_%s' % (macro, strver),
'"%s;%s"' % (name, vers))
- if label.GetRelease(vers) == release:
+ if label.GetRelease(vers) == self.release:
out += self.GetDefine(macro, '%s_%s' % (macro, strver))
out += '\n'
return out
@@ -478,7 +477,7 @@
label = node.GetLabel()
if label:
- lver = label.GetVersion('M14')
+ lver = label.GetVersion(self.release)
# Verify that we are in a valid version.
if node_max <= lver: return ''
« no previous file with comments | « ppapi/generators/idl_c_header.py ('k') | ppapi/generators/idl_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698