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

Unified Diff: third_party/re2/re2/make_unicode_groups.py

Issue 1516543002: Update re2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/re2/re2/make_unicode_groups.py
diff --git a/third_party/re2/re2/make_unicode_groups.py b/third_party/re2/re2/make_unicode_groups.py
index c2e25c1fc75ca0626c5092043feb1cd8cde31c94..8499793fa740cc6b749e42d7247219f4f2c5410a 100755
--- a/third_party/re2/re2/make_unicode_groups.py
+++ b/third_party/re2/re2/make_unicode_groups.py
@@ -41,7 +41,7 @@ def MakeRanges(codes):
def PrintRanges(type, name, ranges):
"""Print the ranges as an array of type named name."""
- print "static %s %s[] = {" % (type, name,)
+ print "static const %s %s[] = {" % (type, name,)
for lo, hi in ranges:
print "\t{ %d, %d }," % (lo, hi)
print "};"
@@ -99,12 +99,12 @@ def main():
for name, codes in unicode.Scripts().iteritems():
ugroups.append(PrintGroup(name, codes))
print "// %d 16-bit ranges, %d 32-bit ranges" % (n16, n32)
- print "UGroup unicode_groups[] = {";
+ print "const UGroup unicode_groups[] = {";
ugroups.sort()
for ug in ugroups:
print "\t%s," % (ug,)
print "};"
- print "int num_unicode_groups = %d;" % (len(ugroups),)
+ print "const int num_unicode_groups = %d;" % (len(ugroups),)
print _trailer
if __name__ == '__main__':

Powered by Google App Engine
This is Rietveld 408576698