| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 if this_include_path: | 154 if this_include_path: |
| 155 paths_dict['include_paths'].append(this_include_path) | 155 paths_dict['include_paths'].append(this_include_path) |
| 156 | 156 |
| 157 | 157 |
| 158 def compute_individual_info(idl_filename): | 158 def compute_individual_info(idl_filename): |
| 159 full_path = os.path.realpath(idl_filename) | 159 full_path = os.path.realpath(idl_filename) |
| 160 idl_file_contents = get_file_contents(full_path) | 160 idl_file_contents = get_file_contents(full_path) |
| 161 | 161 |
| 162 extended_attributes = get_interface_extended_attributes_from_idl(idl_file_co
ntents) | 162 extended_attributes = get_interface_extended_attributes_from_idl(idl_file_co
ntents) |
| 163 implemented_as = extended_attributes.get('ImplementedAs') | 163 implemented_as = extended_attributes.get('ImplementedAs') |
| 164 # FIXME: remove [NoHeader] once switch to Python | |
| 165 this_include_path = (include_path(idl_filename, implemented_as) | 164 this_include_path = (include_path(idl_filename, implemented_as) |
| 166 if ('ImplementedInBaseClass' not in extended_attributes | 165 if 'ImplementedInBaseClass' not in extended_attributes |
| 167 and 'NoHeader' not in extended_attributes) | |
| 168 else None) | 166 else None) |
| 169 | 167 |
| 170 # Handle partial interfaces | 168 # Handle partial interfaces |
| 171 partial_interface_name = get_partial_interface_name_from_idl(idl_file_conten
ts) | 169 partial_interface_name = get_partial_interface_name_from_idl(idl_file_conten
ts) |
| 172 if partial_interface_name: | 170 if partial_interface_name: |
| 173 add_paths_to_partials_dict(partial_interface_name, full_path, this_inclu
de_path) | 171 add_paths_to_partials_dict(partial_interface_name, full_path, this_inclu
de_path) |
| 174 return | 172 return |
| 175 | 173 |
| 176 # If not a partial interface, the basename is the interface name | 174 # If not a partial interface, the basename is the interface name |
| 177 interface_name, _ = os.path.splitext(os.path.basename(idl_filename)) | 175 interface_name, _ = os.path.splitext(os.path.basename(idl_filename)) |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 idl_files.extend(args) | 283 idl_files.extend(args) |
| 286 | 284 |
| 287 compute_interfaces_info(idl_files) | 285 compute_interfaces_info(idl_files) |
| 288 write_pickle_file(options.interfaces_info_file, | 286 write_pickle_file(options.interfaces_info_file, |
| 289 interfaces_info, | 287 interfaces_info, |
| 290 options.write_file_only_if_changed) | 288 options.write_file_only_if_changed) |
| 291 | 289 |
| 292 | 290 |
| 293 if __name__ == '__main__': | 291 if __name__ == '__main__': |
| 294 sys.exit(main()) | 292 sys.exit(main()) |
| OLD | NEW |