| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # | 2 # |
| 3 # Copyright (C) 2013 Google Inc. All rights reserved. | 3 # Copyright (C) 2013 Google Inc. All rights reserved. |
| 4 # | 4 # |
| 5 # Redistribution and use in source and binary forms, with or without | 5 # Redistribution and use in source and binary forms, with or without |
| 6 # modification, are permitted provided that the following conditions are | 6 # modification, are permitted provided that the following conditions are |
| 7 # met: | 7 # met: |
| 8 # | 8 # |
| 9 # * Redistributions of source code must retain the above copyright | 9 # * Redistributions of source code must retain the above copyright |
| 10 # notice, this list of conditions and the following disclaimer. | 10 # notice, this list of conditions and the following disclaimer. |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 interface_info['unforgeable_attributes'][component] = unforgeable_at
tributes | 212 interface_info['unforgeable_attributes'][component] = unforgeable_at
tributes |
| 213 return interface_info | 213 return interface_info |
| 214 | 214 |
| 215 definitions = self.reader.read_idl_file(idl_filename) | 215 definitions = self.reader.read_idl_file(idl_filename) |
| 216 | 216 |
| 217 this_union_types = collect_union_types_from_definitions(definitions) | 217 this_union_types = collect_union_types_from_definitions(definitions) |
| 218 self.union_types.update(this_union_types) | 218 self.union_types.update(this_union_types) |
| 219 self.typedefs.update(definitions.typedefs) | 219 self.typedefs.update(definitions.typedefs) |
| 220 for callback_function_name, callback_function in definitions.callback_fu
nctions.iteritems(): | 220 for callback_function_name, callback_function in definitions.callback_fu
nctions.iteritems(): |
| 221 if 'ExperimentalCallbackFunction' in callback_function.extended_attr
ibutes: | 221 if 'ExperimentalCallbackFunction' in callback_function.extended_attr
ibutes: |
| 222 self.callback_functions[callback_function_name] = callback_funct
ion | 222 # Set 'component_dir' to specify a directory that callback funct
ion files belong to |
| 223 self.callback_functions[callback_function_name] = { |
| 224 'callback_function': callback_function, |
| 225 'component_dir': idl_filename_to_component(idl_filename), |
| 226 } |
| 223 # Check enum duplication. | 227 # Check enum duplication. |
| 224 for enum_name in definitions.enumerations.keys(): | 228 for enum_name in definitions.enumerations.keys(): |
| 225 for defined_enum in self.enumerations: | 229 for defined_enum in self.enumerations: |
| 226 if defined_enum.name == enum_name: | 230 if defined_enum.name == enum_name: |
| 227 raise Exception('Enumeration %s has multiple definitions' %
enum_name) | 231 raise Exception('Enumeration %s has multiple definitions' %
enum_name) |
| 228 self.enumerations.update(definitions.enumerations.values()) | 232 self.enumerations.update(definitions.enumerations.values()) |
| 229 | 233 |
| 230 if definitions.interfaces: | 234 if definitions.interfaces: |
| 231 definition = next(definitions.interfaces.itervalues()) | 235 definition = next(definitions.interfaces.itervalues()) |
| 232 interface_info = { | 236 interface_info = { |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 | 359 |
| 356 write_pickle_file(options.interfaces_info_file, | 360 write_pickle_file(options.interfaces_info_file, |
| 357 info_collector.get_info_as_dict(), | 361 info_collector.get_info_as_dict(), |
| 358 options.write_file_only_if_changed) | 362 options.write_file_only_if_changed) |
| 359 write_pickle_file(options.component_info_file, | 363 write_pickle_file(options.component_info_file, |
| 360 info_collector.get_component_info_as_dict(), | 364 info_collector.get_component_info_as_dict(), |
| 361 options.write_file_only_if_changed) | 365 options.write_file_only_if_changed) |
| 362 | 366 |
| 363 if __name__ == '__main__': | 367 if __name__ == '__main__': |
| 364 sys.exit(main()) | 368 sys.exit(main()) |
| OLD | NEW |