Advertisement
Guest User

Re2Diff

a guest
May 26th, 2010
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.39 KB | None | 0 0
  1. diff -r -d -c re2orig/re2/parse.cc re2/re2/parse.cc
  2. *** re2orig/re2/parse.cc        Wed May 26 06:12:57 2010
  3. --- re2/re2/parse.cc    Wed May 26 05:04:55 2010
  4. ***************
  5. *** 1044,1052 ****
  6.   static UGroup* LookupGroup(const StringPiece& name,
  7.                              UGroup *groups, int ngroups) {
  8.     // Simple name lookup.
  9. !   for (int i = 0; i < ngroups; i++)
  10.       if (groups[i].name == name)
  11.         return &groups[i];
  12.     return NULL;
  13.   }
  14.  
  15. --- 1044,1059 ----
  16.   static UGroup* LookupGroup(const StringPiece& name,
  17.                              UGroup *groups, int ngroups) {
  18.     // Simple name lookup.
  19. !   for (int i = 0; i < ngroups; i++) {
  20. ! #ifdef MINGW
  21. !     //For some reason, it doesn't like stringpiece compare
  22. !       std::string part = groups[i].name;
  23. !     if (part == name.ToString())
  24. ! #else
  25.       if (groups[i].name == name)
  26. + #endif
  27.         return &groups[i];
  28. +   }
  29.     return NULL;
  30.   }
  31.  
  32. ***************
  33. *** 1067,1073 ****
  34. --- 1074,1085 ----
  35.   // Look for a Unicode group with the given name (e.g., "Han")
  36.   static UGroup* LookupUnicodeGroup(const StringPiece& name) {
  37.     // Special case: "Any" means any.
  38. + #ifdef MINGW
  39. +   //For some reason, it doesn't like stringpiece compare
  40. +   if (name.ToString() == "Any")
  41. + #else
  42.     if (name == "Any")
  43. + #endif
  44.       return &anygroup;
  45.     return LookupGroup(name, unicode_groups, num_unicode_groups);
  46.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement