This is an automated email from the git hooks/post-receive script.

glondu pushed a commit to branch master
in repository mikmatch.

commit 0a42c25334e02e3d4b10e42f7b82a7186aa2719c
Author: Stephane Glondu <st...@glondu.net>
Date:   Thu Aug 4 13:54:52 2016 +0200

    Fix for pcre 7.2.0
---
 debian/patches/0003-fix-for-pcre-7.2.0.patch | 90 ++++++++++++++++++++++++++++
 debian/patches/series                        |  1 +
 2 files changed, 91 insertions(+)

diff --git a/debian/patches/0003-fix-for-pcre-7.2.0.patch 
b/debian/patches/0003-fix-for-pcre-7.2.0.patch
new file mode 100644
index 0000000..a7920b2
--- /dev/null
+++ b/debian/patches/0003-fix-for-pcre-7.2.0.patch
@@ -0,0 +1,90 @@
+From: Raman Varabets <ra...@ahrefs.com>
+Date: Wed, 24 Feb 2016 04:02:26 +0000
+Subject: fix for pcre 7.2.0
+
+Origin: https://github.com/mjambon/mikmatch/pull/10
+---
+ common/constants.ml       | 1 -
+ pcre/pcre_lib.ml          | 4 +---
+ pcre/run_mikmatch_pcre.ml | 8 ++++----
+ 3 files changed, 5 insertions(+), 8 deletions(-)
+
+diff --git a/common/constants.ml b/common/constants.ml
+index 07c2f3b..545d2dc 100644
+--- a/common/constants.ml
++++ b/common/constants.ml
+@@ -28,7 +28,6 @@ let patt_exit _loc =
+   <:patt< $uid: !mod_runtime$.$uid:exn_exit$ >>
+ 
+ let shared re_name = re_name ^ "shared"
+-let subgroups2 re_name = re_name ^ "subgroups2"
+ let shared_ovector re_name = re_name ^ "shared_ovector"
+ 
+ let regexp_prefix = reserved_prefix ^ "regexp_"
+diff --git a/pcre/pcre_lib.ml b/pcre/pcre_lib.ml
+index 1713962..1f15ccb 100644
+--- a/pcre/pcre_lib.ml
++++ b/pcre/pcre_lib.ml
+@@ -279,7 +279,6 @@ let process_regexp _loc ~sharing re re_name =
+   let postbindings =
+     if sharing then
+       [ shared_id, <:expr< Pcre.make_ovector $get_re_noargs$ >>;
+-      subgroups2 re_name, <:expr< fst $lid:shared_id$ >>;
+       shared_ovector re_name, <:expr< snd $lid:shared_id$ >> ]
+     else [] in
+   (re_args, re_source, named_groups, postbindings)
+@@ -478,7 +477,6 @@ let macro_match ?(ignore_bindings = false)
+   let target = <:expr< $lid:target_name$ >> in
+   let substrings = substrings_of_target target in
+   let sv = shared_ovector re_name in
+-  let sg2 = subgroups2 re_name in
+   let result =
+     if ignore_bindings then expr
+     else insert_bindings _loc substrings named_groups expr in
+@@ -493,7 +491,7 @@ let macro_match ?(ignore_bindings = false)
+           do { Pcre.unsafe_pcre_exec 
+                  (Obj.magic 0 : Pcre.irflag) 
+                  $get_re$ (match pos with [ None -> 0 | Some n -> n]) 
+-                 $target$ $lid:sg2$
++                 0 $target$
+                  $lid:sv$ None;
+                $lid:sv$ }) : Pcre.substrings) in
+     $result$ >>
+diff --git a/pcre/run_mikmatch_pcre.ml b/pcre/run_mikmatch_pcre.ml
+index 50db948..1334ae2 100644
+--- a/pcre/run_mikmatch_pcre.ml
++++ b/pcre/run_mikmatch_pcre.ml
+@@ -9,14 +9,14 @@ let irflags = rflags []
+ external make_substrings : string * int array -> substrings = "%identity"
+ 
+ let search rex f ?(pos = 0) subj =
+-  let subgroup_offsets, offset_vector = make_ovector rex in
++  let _, offset_vector = make_ovector rex in
+   let substrings = make_substrings (subj, offset_vector) in
+   let subj_len = String.length subj in
+   let rec loop cur_pos =
+     if 
+       try
+       unsafe_pcre_exec 
+-        irflags rex ~pos:cur_pos ~subj_start:0 ~subj 
~subgroups2:subgroup_offsets offset_vector None; true
++        irflags rex ~pos:cur_pos ~subj_start:0 ~subj offset_vector None; true
+       with Not_found -> false
+     then
+       (f substrings;
+@@ -27,14 +27,14 @@ let search rex f ?(pos = 0) subj =
+   loop pos
+ 
+ let scan ~full rex pos ~ftext ~fmatch subj =
+-  let subgroup_offsets, offset_vector = make_ovector rex in
++  let _, offset_vector = make_ovector rex in
+   let substrings = make_substrings (subj, offset_vector) in
+   let subj_len = String.length subj in
+   let rec loop previous_last cur_pos =
+     if 
+       try
+       unsafe_pcre_exec 
+-        irflags rex ~pos:cur_pos ~subj_start:0 ~subj 
~subgroups2:subgroup_offsets offset_vector None; true
++        irflags rex ~pos:cur_pos ~subj_start:0 ~subj offset_vector None; true
+       with Not_found -> 
+       let last = String.length subj in
+       if full || last > previous_last then
diff --git a/debian/patches/series b/debian/patches/series
index ba73cf3..86d6222 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 0001-Makefile-changes.patch
 0002-Make-manual-ocamldoc-4.00-compatible.patch
+0003-fix-for-pcre-7.2.0.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-ocaml-maint/packages/mikmatch.git

_______________________________________________
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to