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

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

Issue 1820873005: Run ppapi/generators/generator.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c » ('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 thunks """ 6 """ Generator for C++ style thunks """
7 7
8 import glob 8 import glob
9 import os 9 import os
10 import re 10 import re
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 cright_node = filenode.GetChildren()[0] 448 cright_node = filenode.GetChildren()[0]
449 assert(cright_node.IsA('Copyright')) 449 assert(cright_node.IsA('Copyright'))
450 out.Write('%s\n' % cgen.Copyright(cright_node, cpp_style=True)) 450 out.Write('%s\n' % cgen.Copyright(cright_node, cpp_style=True))
451 451
452 from_text = 'From %s' % ( 452 from_text = 'From %s' % (
453 filenode.GetProperty('NAME').replace(os.sep,'/')) 453 filenode.GetProperty('NAME').replace(os.sep,'/'))
454 modified_text = 'modified %s.' % ( 454 modified_text = 'modified %s.' % (
455 filenode.GetProperty('DATETIME')) 455 filenode.GetProperty('DATETIME'))
456 out.Write('// %s %s\n\n' % (from_text, modified_text)) 456 out.Write('// %s %s\n\n' % (from_text, modified_text))
457 457
458 meta.AddBuiltinInclude('stdint.h')
458 if meta.BuiltinIncludes(): 459 if meta.BuiltinIncludes():
459 for include in sorted(meta.BuiltinIncludes()): 460 for include in sorted(meta.BuiltinIncludes()):
460 out.Write('#include <%s>\n' % include) 461 out.Write('#include <%s>\n' % include)
461 out.Write('\n') 462 out.Write('\n')
462 463
463 # TODO(teravest): Don't emit includes we don't need. 464 # TODO(teravest): Don't emit includes we don't need.
464 includes = ['ppapi/c/pp_errors.h', 465 includes = ['ppapi/c/pp_errors.h',
465 'ppapi/shared_impl/tracked_callback.h', 466 'ppapi/shared_impl/tracked_callback.h',
466 'ppapi/thunk/enter.h', 467 'ppapi/thunk/enter.h',
467 'ppapi/thunk/ppapi_thunk_export.h'] 468 'ppapi/thunk/ppapi_thunk_export.h']
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 print "Golden file for M13-M15 failed." 575 print "Golden file for M13-M15 failed."
575 failed = 1 576 failed = 1
576 else: 577 else:
577 print "Golden file for M13-M15 passed." 578 print "Golden file for M13-M15 passed."
578 579
579 return failed 580 return failed
580 581
581 582
582 if __name__ == '__main__': 583 if __name__ == '__main__':
583 sys.exit(Main(sys.argv[1:])) 584 sys.exit(Main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698