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

Side by Side Diff: ppapi/generators/idl_c_header.py

Issue 281203002: PPAPI: Make generator support "no_interface_string" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ppapi/generators/idl_gen_wrapper.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """ Generator for C style prototypes and definitions """ 6 """ Generator for C style prototypes and definitions """
7 7
8 import glob 8 import glob
9 import os 9 import os
10 import re 10 import re
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 # Generate all interface defines 281 # Generate all interface defines
282 out.Write('\n') 282 out.Write('\n')
283 for node in filenode.GetListOf('Interface'): 283 for node in filenode.GetListOf('Interface'):
284 idefs = '' 284 idefs = ''
285 macro = cgen.GetInterfaceMacro(node) 285 macro = cgen.GetInterfaceMacro(node)
286 unique = node.GetUniqueReleases(releases) 286 unique = node.GetUniqueReleases(releases)
287 287
288 # Skip this interface if there are no matching versions 288 # Skip this interface if there are no matching versions
289 if not unique: continue 289 if not unique: continue
290 290
291 # Skip this interface if it should have no interface string.
292 if node.GetProperty('no_interface_string'): continue
293
291 last_stable_ver = None 294 last_stable_ver = None
292 last_dev_rel = None 295 last_dev_rel = None
293 for rel in unique: 296 for rel in unique:
294 channel = node.GetProperty('FILE').release_map.GetChannel(rel) 297 channel = node.GetProperty('FILE').release_map.GetChannel(rel)
295 if channel == 'dev': 298 if channel == 'dev':
296 last_dev_rel = rel 299 last_dev_rel = rel
297 300
298 for rel in unique: 301 for rel in unique:
299 version = node.GetVersion(rel) 302 version = node.GetVersion(rel)
300 name = cgen.GetInterfaceString(node, version) 303 name = cgen.GetInterfaceString(node, version)
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 print "Golden file for M13-M17 failed." 365 print "Golden file for M13-M17 failed."
363 failed =1 366 failed =1
364 else: 367 else:
365 print "Golden file for M13-M17 passed." 368 print "Golden file for M13-M17 passed."
366 369
367 return failed 370 return failed
368 371
369 if __name__ == '__main__': 372 if __name__ == '__main__':
370 sys.exit(main(sys.argv[1:])) 373 sys.exit(main(sys.argv[1:]))
371 374
OLDNEW
« no previous file with comments | « no previous file | ppapi/generators/idl_gen_wrapper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698