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