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

Unified Diff: ppapi/generators/idl_c_header.py

Issue 8586031: Convert a few ppapi dev interfaces to IDL. NaCl has tests for these (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clean up a bit more Created 9 years, 1 month 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/c/dev/ppp_printing_dev.h ('k') | 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
diff --git a/ppapi/generators/idl_c_header.py b/ppapi/generators/idl_c_header.py
index e08316cf7e97f6ba393eab49928057453f94ca96..7813b0b7895f7ec44d224390c59478fe541d4f56 100644
--- a/ppapi/generators/idl_c_header.py
+++ b/ppapi/generators/idl_c_header.py
@@ -90,6 +90,11 @@ def GenerateHeader(out, filenode, releases):
name = '%s%s' % (pref, node.GetName())
if node.IsA('Struct'):
form = 'PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(%s, %s);\n'
+ elif node.IsA('Enum'):
+ if node.GetProperty('notypedef'):
+ form = 'PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(%s, %s);\n'
+ else:
+ form = 'PP_COMPILE_ASSERT_SIZE_IN_BYTES(%s, %s);\n'
else:
form = 'PP_COMPILE_ASSERT_SIZE_IN_BYTES(%s, %s);\n'
item += form % (name, asize[0])
@@ -219,4 +224,3 @@ def Main(args):
if __name__ == '__main__':
retval = Main(sys.argv[1:])
sys.exit(retval)
-
« no previous file with comments | « ppapi/c/dev/ppp_printing_dev.h ('k') | ppapi/generators/idl_c_proto.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698