Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -r -d -c re2orig/re2/parse.cc re2/re2/parse.cc
- *** re2orig/re2/parse.cc Wed May 26 06:12:57 2010
- --- re2/re2/parse.cc Wed May 26 05:04:55 2010
- ***************
- *** 1044,1052 ****
- static UGroup* LookupGroup(const StringPiece& name,
- UGroup *groups, int ngroups) {
- // Simple name lookup.
- ! for (int i = 0; i < ngroups; i++)
- if (groups[i].name == name)
- return &groups[i];
- return NULL;
- }
- --- 1044,1059 ----
- static UGroup* LookupGroup(const StringPiece& name,
- UGroup *groups, int ngroups) {
- // Simple name lookup.
- ! for (int i = 0; i < ngroups; i++) {
- ! #ifdef MINGW
- ! //For some reason, it doesn't like stringpiece compare
- ! std::string part = groups[i].name;
- ! if (part == name.ToString())
- ! #else
- if (groups[i].name == name)
- + #endif
- return &groups[i];
- + }
- return NULL;
- }
- ***************
- *** 1067,1073 ****
- --- 1074,1085 ----
- // Look for a Unicode group with the given name (e.g., "Han")
- static UGroup* LookupUnicodeGroup(const StringPiece& name) {
- // Special case: "Any" means any.
- + #ifdef MINGW
- + //For some reason, it doesn't like stringpiece compare
- + if (name.ToString() == "Any")
- + #else
- if (name == "Any")
- + #endif
- return &anygroup;
- return LookupGroup(name, unicode_groups, num_unicode_groups);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement