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

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

Issue 1422773008: Fixing remaining VC++ 2015 64-bit build breaks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to latest 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 os.path 3 import os.path
4 import re 4 import re
5 import subprocess 5 import subprocess
6 import sys 6 import sys
7 7
8 from in_file import InFile 8 from in_file import InFile
9 from name_utilities import upper_first_letter 9 from name_utilities import upper_first_letter
10 import in_generator 10 import in_generator
(...skipping 28 matching lines...) Expand all
39 39
40 GPERF_TEMPLATE = """ 40 GPERF_TEMPLATE = """
41 %%{ 41 %%{
42 %(license)s 42 %(license)s
43 43
44 #include "config.h" 44 #include "config.h"
45 #include "%(class_name)s.h" 45 #include "%(class_name)s.h"
46 #include "core/css/HashTools.h" 46 #include "core/css/HashTools.h"
47 #include <string.h> 47 #include <string.h>
48 48
49 #ifdef _MSC_VER
50 // Disable the warnings from casting a 64-bit pointer to 32-bit long
51 // warning C4302: 'type cast': truncation from 'char (*)[28]' to 'long'
52 #pragma warning(disable : 4302)
53 #endif
54
49 namespace blink { 55 namespace blink {
50 static const char valueListStringPool[] = { 56 static const char valueListStringPool[] = {
51 %(value_keyword_strings)s 57 %(value_keyword_strings)s
52 }; 58 };
53 59
54 static const unsigned short valueListStringOffsets[] = { 60 static const unsigned short valueListStringOffsets[] = {
55 %(value_keyword_offsets)s 61 %(value_keyword_offsets)s
56 }; 62 };
57 63
58 %%} 64 %%}
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 # FIXME: If we could depend on Python 2.7, we would use subprocess.check _output 170 # FIXME: If we could depend on Python 2.7, we would use subprocess.check _output
165 gperf_args = [self.gperf_path, '--key-positions=*', '-P', '-n'] 171 gperf_args = [self.gperf_path, '--key-positions=*', '-P', '-n']
166 gperf_args.extend(['-m', '50']) # Pick best of 50 attempts. 172 gperf_args.extend(['-m', '50']) # Pick best of 50 attempts.
167 gperf_args.append('-D') # Allow duplicate hashes -> More compact code. 173 gperf_args.append('-D') # Allow duplicate hashes -> More compact code.
168 gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subpr ocess.PIPE, universal_newlines=True) 174 gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subpr ocess.PIPE, universal_newlines=True)
169 return gperf.communicate(gperf_input)[0] 175 return gperf.communicate(gperf_input)[0]
170 176
171 177
172 if __name__ == "__main__": 178 if __name__ == "__main__":
173 in_generator.Maker(CSSValueKeywordsWriter).main(sys.argv) 179 in_generator.Maker(CSSValueKeywordsWriter).main(sys.argv)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698