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

Unified Diff: ppapi/generators/idl_c_proto.py

Issue 98343005: Pepper: More IDL generator cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix for json_schema_compiler Created 7 years 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_ast.py ('k') | ppapi/generators/idl_log.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
diff --git a/ppapi/generators/idl_c_proto.py b/ppapi/generators/idl_c_proto.py
index 7e49c02d5084a414907be44261dd4205fdac1c15..34d5361a82c86d2d0d85445741542a2b42dfb56c 100755
--- a/ppapi/generators/idl_c_proto.py
+++ b/ppapi/generators/idl_c_proto.py
@@ -568,28 +568,22 @@ class CGen(object):
if len(build_list) != 1:
node.Error('Can not support multiple versions of node.')
assert len(build_list) == 1
-
+ out = self.DefineStructInternals(node, build_list[-1],
+ include_version=False, comment=True)
if node.IsA('Interface'):
# Build the most recent one versioned, with comments
out = self.DefineStructInternals(node, build_list[-1],
include_version=True, comment=True)
-
# Define an unversioned typedef for the most recent version
out += '\ntypedef struct %s %s;\n' % (
self.GetStructName(node, build_list[-1], include_version=True),
self.GetStructName(node, build_list[-1], include_version=False))
- else:
- # Build the most recent one versioned, with comments
- out = self.DefineStructInternals(node, build_list[-1],
- include_version=False, comment=True)
-
-
- # Build the rest without comments and with the version number appended
- for rel in build_list[0:-1]:
- out += '\n' + self.DefineStructInternals(node, rel,
- include_version=True,
- comment=False)
+ # Build the rest without comments and with the version number appended
+ for rel in build_list[0:-1]:
+ out += '\n' + self.DefineStructInternals(node, rel,
+ include_version=True,
+ comment=False)
self.LogExit('Exit DefineStruct')
return out
@@ -752,7 +746,7 @@ def main(args):
print 'Skipping %s' % f.GetName()
continue
for node in f.GetChildren()[2:]:
- print cgen.Define(node, comment=True, prefix='tst_')
+ print cgen.Define(node, ast.releases, comment=True, prefix='tst_')
if __name__ == '__main__':
« no previous file with comments | « ppapi/generators/idl_ast.py ('k') | ppapi/generators/idl_log.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698