Chromium Code Reviews| Index: tools/json_schema_compiler/compiler.py |
| diff --git a/tools/json_schema_compiler/compiler.py b/tools/json_schema_compiler/compiler.py |
| index 21281fcdabfb1292bd0f8eb09519e2978061d519..0601d83a030e9e340cebef9f13abbd9196f941c3 100755 |
| --- a/tools/json_schema_compiler/compiler.py |
| +++ b/tools/json_schema_compiler/compiler.py |
| @@ -74,7 +74,8 @@ def GenerateSchema(generator, |
| # Filenames are checked against the unix_names of the namespaces they |
| # generate because the gyp uses the names of the JSON files to generate |
| # the names of the .cc and .h files. We want these to be using unix_names. |
| - if namespace.unix_name != short_filename: |
| + if (namespace.unix_name != short_filename and |
| + not namespace.allow_custom_filename): |
| sys.exit("Filename %s is illegal. Name files using unix_hacker style." % |
|
David Tseng
2014/01/27 20:07:21
To expand, I'll have to get rid of this check. Is
not at google - send to devlin
2014/01/27 20:08:40
Yes that's fine.
|
| schema_filename) |
| @@ -99,8 +100,8 @@ def GenerateSchema(generator, |
| elif generator == 'cpp': |
| cpp_generator = CppGenerator(type_generator, root_namespace) |
| generators = [ |
| - ('%s.h' % namespace.unix_name, cpp_generator.h_generator), |
| - ('%s.cc' % namespace.unix_name, cpp_generator.cc_generator) |
| + ('%s.h' % short_filename, cpp_generator.h_generator), |
| + ('%s.cc' % short_filename, cpp_generator.cc_generator) |
| ] |
| elif generator == 'dart': |
| generators = [ |