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

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

Issue 126343002: Make some of the pnacl_irt_shim data members local. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 11 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/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 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Base class for generating wrapper functions for PPAPI methods. 5 """Base class for generating wrapper functions for PPAPI methods.
6 """ 6 """
7 7
8 from datetime import datetime 8 from datetime import datetime
9 import os 9 import os
10 import sys 10 import sys
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 return ''.join(result) 317 return ''.join(result)
318 318
319 319
320 def GenerateWrapperInterfaces(self, iface_releases, out): 320 def GenerateWrapperInterfaces(self, iface_releases, out):
321 for iface in iface_releases: 321 for iface in iface_releases:
322 if not iface.needs_wrapping: 322 if not iface.needs_wrapping:
323 out.Write('/* Not generating wrapper interface for %s */\n\n' % 323 out.Write('/* Not generating wrapper interface for %s */\n\n' %
324 iface.struct_name) 324 iface.struct_name)
325 continue 325 continue
326 326
327 out.Write('struct %s %s_Wrappers_%s = {\n' % (iface.struct_name, 327 out.Write('static struct %s %s_Wrappers_%s = {\n' % (iface.struct_name,
328 self.wrapper_prefix, 328 self.wrapper_prefix,
329 iface.struct_name)) 329 iface.struct_name))
330 methods = [] 330 methods = []
331 for member in iface.node.GetListOf('Member'): 331 for member in iface.node.GetListOf('Member'):
332 # Skip the method if it's not actually in the release. 332 # Skip the method if it's not actually in the release.
333 if not member.InReleases([iface.release]): 333 if not member.InReleases([iface.release]):
334 continue 334 continue
335 prefix = self.WrapperMethodPrefix(iface.node, iface.release) 335 prefix = self.WrapperMethodPrefix(iface.node, iface.release)
336 # Casts are necessary for the PPB_* wrappers because we must 336 # Casts are necessary for the PPB_* wrappers because we must
337 # cast away "__attribute__((pnaclcall))". The PPP_* wrappers 337 # cast away "__attribute__((pnaclcall))". The PPP_* wrappers
338 # must match the default calling conventions and so don't have 338 # must match the default calling conventions and so don't have
339 # the attribute, so omitting casts for them provides a little 339 # the attribute, so omitting casts for them provides a little
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 self.GenerateWrapperInterfaces(iface_releases, out) 440 self.GenerateWrapperInterfaces(iface_releases, out)
441 441
442 # Generate a table of the wrapped interface structs that can be looked up. 442 # Generate a table of the wrapped interface structs that can be looked up.
443 self.GenerateWrapperInfoAndCollection(iface_releases, out) 443 self.GenerateWrapperInfoAndCollection(iface_releases, out)
444 444
445 # Write out the IDL-invariant functions. 445 # Write out the IDL-invariant functions.
446 self.GenerateFixedFunctions(out) 446 self.GenerateFixedFunctions(out)
447 447
448 out.Close() 448 out.Close()
449 return 0 449 return 0
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