Index: third_party/re2/util/pcre.h |
diff --git a/third_party/re2/util/pcre.h b/third_party/re2/util/pcre.h |
index 20b10c069fdae5a18f6be72638c6ae4dc441f88b..771ac91a7e51439fc9be3c6861b10b67d67c74d7 100644 |
--- a/third_party/re2/util/pcre.h |
+++ b/third_party/re2/util/pcre.h |
@@ -167,9 +167,28 @@ |
const bool UsingPCRE = true; |
} // namespace re2 |
#else |
-struct pcre; // opaque |
namespace re2 { |
const bool UsingPCRE = false; |
+struct pcre; |
+struct pcre_extra { int flags, match_limit, match_limit_recursion; }; |
+#define pcre_free(x) {} |
+#define PCRE_EXTRA_MATCH_LIMIT 0 |
+#define PCRE_EXTRA_MATCH_LIMIT_RECURSION 0 |
+#define PCRE_ANCHORED 0 |
+#define PCRE_NOTEMPTY 0 |
+#define PCRE_ERROR_NOMATCH 1 |
+#define PCRE_ERROR_MATCHLIMIT 2 |
+#define PCRE_ERROR_RECURSIONLIMIT 3 |
+#define PCRE_INFO_CAPTURECOUNT 0 |
+#ifndef WIN32 |
+#define pcre_compile(a,b,c,d,e) ({ (void)(a); (void)(b); *(c)=""; *(d)=0; (void)(e); ((pcre*)0); }) |
+#define pcre_exec(a, b, c, d, e, f, g, h) ({ (void)(a); (void)(b); (void)(c); (void)(d); (void)(e); (void)(f); (void)(g); (void)(h); 0; }) |
+#define pcre_fullinfo(a, b, c, d) ({ (void)(a); (void)(b); (void)(c); *(d) = 0; 0; }) |
+#else |
+#define pcre_compile(a,b,c,d,e) NULL |
+#define pcre_exec(a, b, c, d, e, f, g, h) NULL |
+#define pcre_fullinfo(a, b, c, d) NULL |
+#endif |
} // namespace re2 |
#endif |
@@ -497,7 +516,7 @@ |
int match_limit_; // Limit on execution resources |
int stack_limit_; // Limit on stack resources (bytes) |
mutable int32_t hit_limit_; // Hit limit during execution (bool)? |
- DISALLOW_COPY_AND_ASSIGN(PCRE); |
+ DISALLOW_EVIL_CONSTRUCTORS(PCRE); |
}; |
// PCRE_Options allow you to set the PCRE::Options, plus any pcre |