Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(826)

Side by Side Diff: third_party/WebKit/Source/build/scripts/make_css_property_names.py

Issue 1422773008: Fixing remaining VC++ 2015 64-bit build breaks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Supply reference for handles-are-32-bits claim Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
Nico 2015/11/16 21:31:07 Can you say why that's safe here too? Some of the
92 // warning C4302: 'type cast': truncation from 'char (*)[28]' to 'long'
93 // warning C4311: 'type cast': pointer truncation from 'char (*)[18]' to 'long'
94 #pragma warning(disable : 4302 4311)
95 #endif
96
90 namespace blink { 97 namespace blink {
91 static const char propertyNameStringsPool[] = { 98 static const char propertyNameStringsPool[] = {
92 %(property_name_strings)s 99 %(property_name_strings)s
93 }; 100 };
94 101
95 static const unsigned short propertyNameStringsOffsets[] = { 102 static const unsigned short propertyNameStringsOffsets[] = {
96 %(property_name_offsets)s 103 %(property_name_offsets)s
97 }; 104 };
98 105
99 %%} 106 %%}
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 # FIXME: If we could depend on Python 2.7, we would use subprocess.check _output 230 # 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'] 231 gperf_args = [self.gperf_path, '--key-positions=*', '-P', '-n']
225 gperf_args.extend(['-m', '50']) # Pick best of 50 attempts. 232 gperf_args.extend(['-m', '50']) # Pick best of 50 attempts.
226 gperf_args.append('-D') # Allow duplicate hashes -> More compact code. 233 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) 234 gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subpr ocess.PIPE, universal_newlines=True)
228 return gperf.communicate(gperf_input)[0] 235 return gperf.communicate(gperf_input)[0]
229 236
230 237
231 if __name__ == "__main__": 238 if __name__ == "__main__":
232 in_generator.Maker(CSSPropertyNamesWriter).main(sys.argv) 239 in_generator.Maker(CSSPropertyNamesWriter).main(sys.argv)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698