1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
From: Mark Baker <mark@mnb.org.uk>
Description: Include old interface to RE::Init() for PCRE 6.x compatibility
--- a/pcrecpp.cc
+++ b/pcrecpp.cc
@@ -80,6 +80,12 @@
// If the user doesn't ask for any options, we just use this one
static RE_Options default_options;
+// PCRE6.x compatible API
+void RE::Init(const char *c_pat, const RE_Options* options) {
+ const string cxx_pat(c_pat);
+ Init(cxx_pat, options);
+}
+
void RE::Init(const string& pat, const RE_Options* options) {
pattern_ = pat;
if (options == NULL) {
--- a/pcrecpp.h
+++ b/pcrecpp.h
@@ -658,6 +658,8 @@
private:
void Init(const string& pattern, const RE_Options* options);
+ // Old version from PCRE 6.x, for compatibility
+ void Init(const char *pattern, const RE_Options* options);
void Cleanup();
// Match against "text", filling in "vec" (up to "vecsize" * 2/3) with
--- a/pcretest.c
+++ b/pcretest.c
@@ -2976,7 +2976,7 @@
{
FILE *infile = stdin;
const char *version;
-int options = 0;
+long int options = 0;
int study_options = 0;
int default_find_match_limit = FALSE;
pcre_uint32 default_options = 0;
|