Index: ppapi/generators/idl_c_proto.py |
diff --git a/ppapi/generators/idl_c_proto.py b/ppapi/generators/idl_c_proto.py |
index 861f86f2efbaa8e07d062f40255a4727ceb6f1b0..ba0d37a55da287876d115219992253cb10922137 100644 |
--- a/ppapi/generators/idl_c_proto.py |
+++ b/ppapi/generators/idl_c_proto.py |
@@ -498,9 +498,20 @@ class CGen(object): |
out = '' |
build_list = node.GetUniqueReleases(releases) |
- # Build the most recent one with comments |
- 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]: |