OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |