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

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

Issue 10566014: Change PP_Flash_BrowserOperations_SiteSetting.site from PP_Var to const char*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove assert_size Created 8 years, 6 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 | « ppapi/c/private/ppp_flash_browser_operations.h ('k') | no next file » | 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 sys 10 import sys
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 'return': '%s', 116 'return': '%s',
117 'store': '%s' 117 'store': '%s'
118 }, 118 },
119 'str_t': { 119 'str_t': {
120 'in': 'const %s', 120 'in': 'const %s',
121 'inout': '%s', 121 'inout': '%s',
122 'out': '%s', 122 'out': '%s',
123 'return': 'const %s', 123 'return': 'const %s',
124 'store': '%s' 124 'store': '%s'
125 }, 125 },
126 'cstr_t': {
127 'in': '%s',
128 'inout': '%s*',
129 'out': '%s*',
130 'return': '%s',
131 'store': '%s'
132 },
126 'TypeValue': { 133 'TypeValue': {
127 'in': '%s', 134 'in': '%s',
128 'inout': '%s*', 135 'inout': '%s*',
129 'out': '%s*', 136 'out': '%s*',
130 'return': '%s', 137 'return': '%s',
131 'store': '%s' 138 'store': '%s'
132 }, 139 },
133 } 140 }
134 141
135 142
136 # 143 #
137 # RemapName 144 # RemapName
138 # 145 #
139 # A diction array of PPAPI types that are converted to language specific 146 # A diction array of PPAPI types that are converted to language specific
140 # types before being returned by by the C generator 147 # types before being returned by by the C generator
141 # 148 #
142 RemapName = { 149 RemapName = {
143 'blob_t': 'void**', 150 'blob_t': 'void**',
144 'float_t': 'float', 151 'float_t': 'float',
145 'double_t': 'double', 152 'double_t': 'double',
146 'handle_t': 'int', 153 'handle_t': 'int',
147 'mem_t': 'void*', 154 'mem_t': 'void*',
148 'str_t': 'char*', 155 'str_t': 'char*',
156 'cstr_t': 'const char*',
149 'interface_t' : 'const void*' 157 'interface_t' : 'const void*'
150 } 158 }
151 159
152 def __init__(self): 160 def __init__(self):
153 self.dbg_depth = 0 161 self.dbg_depth = 0
154 162
155 # 163 #
156 # Debug Logging functions 164 # Debug Logging functions
157 # 165 #
158 def Log(self, txt): 166 def Log(self, txt):
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 print 'Skipping %s' % f.GetName() 659 print 'Skipping %s' % f.GetName()
652 continue 660 continue
653 print DefineDepends(node) 661 print DefineDepends(node)
654 for node in f.GetChildren()[2:]: 662 for node in f.GetChildren()[2:]:
655 print Define(node, comment=True, prefix='tst_') 663 print Define(node, comment=True, prefix='tst_')
656 664
657 665
658 if __name__ == '__main__': 666 if __name__ == '__main__':
659 sys.exit(Main(sys.argv[1:])) 667 sys.exit(Main(sys.argv[1:]))
660 668
OLDNEW
« no previous file with comments | « ppapi/c/private/ppp_flash_browser_operations.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698