... |
... |
@@ -4,6 +4,8 @@ Subject: Use re instead of pcre |
4
|
4
|
|
5
|
5
|
pcre depends on the pcre3 library which is obsolete. See:
|
6
|
6
|
https://bugs.debian.org/1071970.
|
|
7
|
+
|
|
8
|
+Forwarded: https://github.com/kit-ty-kate/ocamldap/pull/7
|
7
|
9
|
---
|
8
|
10
|
src/ldap/dune | 2 +-
|
9
|
11
|
src/ldap/ldap_filter.ml | 22 ++++++++++++----------
|
... |
... |
@@ -22,7 +24,7 @@ index 0371743..bc629a3 100644 |
22
|
24
|
- (libraries str camlp-streams pcre ssl))
|
23
|
25
|
+ (libraries str camlp-streams re ssl))
|
24
|
26
|
diff --git a/src/ldap/ldap_filter.ml b/src/ldap/ldap_filter.ml
|
25
|
|
-index 17f7072..17c52d3 100644
|
|
27
|
+index 17f7072..6975f16 100644
|
26
|
28
|
--- a/src/ldap/ldap_filter.ml
|
27
|
29
|
+++ b/src/ldap/ldap_filter.ml
|
28
|
30
|
@@ -23,21 +23,23 @@ open Ldap_filterparser
|
... |
... |
@@ -43,8 +45,8 @@ index 17f7072..17c52d3 100644 |
43
|
45
|
+let star_rex = Pcre.regexp "\\*"
|
44
|
46
|
+let lparen_rex = Pcre.regexp "\\("
|
45
|
47
|
+let rparen_rex = Pcre.regexp "\\)"
|
46
|
|
-+let backslash_rex = Pcre.regexp "\\Q\\\\E"
|
47
|
|
-+let null_rex = Pcre.regexp "\\000"
|
|
48
|
++let backslash_rex = Re.(compile (char '\\'))
|
|
49
|
++let null_rex = Re.(compile (char '\000'))
|
48
|
50
|
let escape_filterstring s =
|
49
|
51
|
- (Pcre.qreplace ~rex:star_rex ~templ:"\\2a"
|
50
|
52
|
- (Pcre.qreplace ~rex:lparen_rex ~templ:"\\28"
|