OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 import subprocess | 3 import subprocess |
4 import sys | 4 import sys |
5 | 5 |
6 import css_properties | 6 import css_properties |
7 import in_generator | 7 import in_generator |
8 import license | 8 import license |
9 | 9 |
10 | 10 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 | 80 |
81 #include "config.h" | 81 #include "config.h" |
82 #include "%(class_name)s.h" | 82 #include "%(class_name)s.h" |
83 #include "core/css/HashTools.h" | 83 #include "core/css/HashTools.h" |
84 #include <string.h> | 84 #include <string.h> |
85 | 85 |
86 #include "wtf/ASCIICType.h" | 86 #include "wtf/ASCIICType.h" |
87 #include "wtf/text/AtomicString.h" | 87 #include "wtf/text/AtomicString.h" |
88 #include "wtf/text/WTFString.h" | 88 #include "wtf/text/WTFString.h" |
89 | 89 |
90 #ifdef _MSC_VER | |
91 // Disable the warnings from casting a 64-bit pointer to 32-bit long | |
92 // warning C4302: 'type cast': truncation from 'char (*)[28]' to 'long' | |
93 #pragma warning(disable : 4302) | |
Will Harris
2015/11/10 18:05:14
where are these warnings generated from? do you ha
brucedawson
2015/11/10 18:43:26
They show up in two generated files and I've added
Will Harris
2015/11/10 19:45:45
Acknowledged.
| |
94 #endif | |
95 | |
90 namespace blink { | 96 namespace blink { |
91 static const char propertyNameStringsPool[] = { | 97 static const char propertyNameStringsPool[] = { |
92 %(property_name_strings)s | 98 %(property_name_strings)s |
93 }; | 99 }; |
94 | 100 |
95 static const unsigned short propertyNameStringsOffsets[] = { | 101 static const unsigned short propertyNameStringsOffsets[] = { |
96 %(property_name_offsets)s | 102 %(property_name_offsets)s |
97 }; | 103 }; |
98 | 104 |
99 %%} | 105 %%} |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
223 # FIXME: If we could depend on Python 2.7, we would use subprocess.check _output | 229 # FIXME: If we could depend on Python 2.7, we would use subprocess.check _output |
224 gperf_args = [self.gperf_path, '--key-positions=*', '-P', '-n'] | 230 gperf_args = [self.gperf_path, '--key-positions=*', '-P', '-n'] |
225 gperf_args.extend(['-m', '50']) # Pick best of 50 attempts. | 231 gperf_args.extend(['-m', '50']) # Pick best of 50 attempts. |
226 gperf_args.append('-D') # Allow duplicate hashes -> More compact code. | 232 gperf_args.append('-D') # Allow duplicate hashes -> More compact code. |
227 gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subpr ocess.PIPE, universal_newlines=True) | 233 gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subpr ocess.PIPE, universal_newlines=True) |
228 return gperf.communicate(gperf_input)[0] | 234 return gperf.communicate(gperf_input)[0] |
229 | 235 |
230 | 236 |
231 if __name__ == "__main__": | 237 if __name__ == "__main__": |
232 in_generator.Maker(CSSPropertyNamesWriter).main(sys.argv) | 238 in_generator.Maker(CSSPropertyNamesWriter).main(sys.argv) |
OLD | NEW |