Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ocaml-extlib for openSUSE:Factory 
checked in at 2022-08-15 19:58:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ocaml-extlib (Old)
 and      /work/SRC/openSUSE:Factory/.ocaml-extlib.new.1521 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ocaml-extlib"

Mon Aug 15 19:58:44 2022 rev:10 rq:995178 version:1.7.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/ocaml-extlib/ocaml-extlib.changes        
2021-09-29 20:19:32.267042704 +0200
+++ /work/SRC/openSUSE:Factory/.ocaml-extlib.new.1521/ocaml-extlib.changes      
2022-08-15 20:00:55.541512728 +0200
@@ -1,0 +2,8 @@
+Tue Aug  2 02:02:02 UTC 2022 - oher...@suse.de
+
+- Update to version 1.7.9
+  * Add support for OCaml 5.0
+  * Exclude unzip and base64 from build
+- remove obsolete ocaml-extlib.patch
+
+-------------------------------------------------------------------

Old:
----
  ocaml-extlib-1.7.8.tar.xz
  ocaml-extlib.patch

New:
----
  ocaml-extlib-1.7.9.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ocaml-extlib.spec ++++++
--- /var/tmp/diff_new_pack.8NTaH0/_old  2022-08-15 20:00:55.981513954 +0200
+++ /var/tmp/diff_new_pack.8NTaH0/_new  2022-08-15 20:00:55.985513966 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ocaml-extlib
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 # Copyright (c) 2011 Andrew Psaltis <ampsaltis at gmail dot com>
 #
 # All modifications and additions to the file contributed by third parties
@@ -18,19 +18,18 @@
 
 
 Name:           ocaml-extlib
-Version:        1.7.8
+Version:        1.7.9
 Release:        0
 %{?ocaml_preserve_bytecode}
 Summary:        OCaml ExtLib additions to the standard library
 License:        LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception
 Group:          Development/Languages/OCaml
 URL:            https://opam.ocaml.org/packages/extlib
-Source0:        %{name}-%{version}.tar.xz
-Patch0:         %{name}.patch
+Source0:        %name-%version.tar.xz
 BuildRequires:  ocaml
 BuildRequires:  ocaml-cppo
 BuildRequires:  ocaml-dune
-BuildRequires:  ocaml-rpm-macros >= 20210911
+BuildRequires:  ocaml-rpm-macros >= 20220707
 
 %description
 ExtLib is a project aiming at providing a complete - yet small -
@@ -41,13 +40,13 @@
 should be useful for the average OCaml programmer.
 
 %package        devel
-Summary:        Development files for %{name}
+Summary:        Development files for %name
 Group:          Development/Languages/OCaml
-Requires:       %{name} = %{version}
+Requires:       %name = %version
 
 %description    devel
-The %{name}-devel package contains libraries and signature files for
-developing applications that use %{name}.
+The %name-devel package contains libraries and signature files for
+developing applications that use %name.
 
 %prep
 %autosetup -p1
@@ -64,9 +63,9 @@
 %check
 %ocaml_dune_test
 
-%files -f %{name}.files
+%files -f %name.files
 %doc README.md
 
-%files devel -f %{name}.files.devel
+%files devel -f %name.files.devel
 
 %changelog

++++++ _service ++++++
--- /var/tmp/diff_new_pack.8NTaH0/_old  2022-08-15 20:00:56.037514111 +0200
+++ /var/tmp/diff_new_pack.8NTaH0/_new  2022-08-15 20:00:56.041514121 +0200
@@ -1,7 +1,7 @@
 <services>
   <service name="tar_scm" mode="disabled">
     <param name="filename">ocaml-extlib</param>
-    <param name="revision">079e7a8f58bd77990df46e3a27791f9853e072fe</param>
+    <param name="revision">cfb2d9632d117020f9c9bfdabea679ae9222a620</param>
     <param name="scm">git</param>
     <param name="submodules">disable</param>
     <param name="url">https://github.com/ygrek/ocaml-extlib.git</param>

++++++ ocaml-extlib-1.7.8.tar.xz -> ocaml-extlib-1.7.9.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/.gitignore 
new/ocaml-extlib-1.7.9/.gitignore
--- old/ocaml-extlib-1.7.8/.gitignore   1970-01-01 01:00:00.000000000 +0100
+++ new/ocaml-extlib-1.7.9/.gitignore   2022-08-05 16:12:23.000000000 +0200
@@ -0,0 +1,19 @@
+*.cmi
+*.cmo
+*.cmx
+*.o
+*.obj
+*.a
+*.lib
+*.cma
+*.cmxa
+*.cmxs
+*.cmt
+*.cmti
+/src/extBytes.mli
+/src/doc/*.html
+/test/extlib_test
+/test/extlib_test.exe
+/test/util/zlib-test/zlib-test
+/_build/
+/_opam/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/CHANGES 
new/ocaml-extlib-1.7.9/CHANGES
--- old/ocaml-extlib-1.7.8/CHANGES      2021-01-20 00:51:04.000000000 +0100
+++ new/ocaml-extlib-1.7.9/CHANGES      2022-08-05 16:12:23.000000000 +0200
@@ -1,3 +1,9 @@
+1.7.9 (2022-08-05)
+* build with OCaml 5 (Kate)
+* minimum supported version is OCaml 4.02 now
+* build with dune (Makefile is now deprecated) (Marek Kubica, Kate)
+* sync String deprecation attributes with upstream
+
 1.7.8 (2021-01-19)
 * sync with OCaml 4.12
 * breaking change: ExtList.find_map type updated to match stdlib (following 
deprecation in previous release)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/Makefile 
new/ocaml-extlib-1.7.9/Makefile
--- old/ocaml-extlib-1.7.8/Makefile     2021-01-20 00:51:04.000000000 +0100
+++ new/ocaml-extlib-1.7.9/Makefile     2022-08-05 16:12:23.000000000 +0200
@@ -1,6 +1,6 @@
 
 VERSION:=$(shell git --git-dir=.git describe --always --long)
-RELEASE:=1.7.8
+RELEASE:=1.7.9
 
 ifndef VERSION
 VERSION:=$(RELEASE)
@@ -48,21 +48,12 @@
 sw_test_$(1):
        -opam exec --switch=$(1) -- make clean build test >/dev/null 2>/dev/null
 # expected to fail < 4.03.0
-ifneq "$(1)" "3.12.1"
-ifneq "$(1)" "4.00.1"
-ifneq "$(1)" "4.01.0"
 ifneq "$(1)" "4.02.3"
-       -opam exec --switch=$(1) -- ocaml test/std.ml
-endif
-endif
-endif
+       -opam exec --switch=$(1) -- ocaml check_stdlib.ml
 endif
 endef
 
 $(foreach version,\
-       3.12.1\
-       4.00.1\
-       4.01.0\
        4.02.3\
        4.03.0\
        4.04.2\
@@ -73,5 +64,8 @@
        4.09.1\
        4.10.2\
        4.11.1\
-       4.12.0~beta1\
+       4.12.0\
+       4.13.1\
+       4.14.0\
+       5.0.0~alpha1\
 ,$(eval $(call gen_sw,$(version))))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/check_stdlib.ml 
new/ocaml-extlib-1.7.9/check_stdlib.ml
--- old/ocaml-extlib-1.7.8/check_stdlib.ml      1970-01-01 01:00:00.000000000 
+0100
+++ new/ocaml-extlib-1.7.9/check_stdlib.ml      2022-08-05 16:12:23.000000000 
+0200
@@ -0,0 +1,24 @@
+(* check compatibility of interfaces *)
+
+#directory "src";;
+#load "extLib.cma";;
+
+module XS = (struct
+  include ExtLib.String
+  external length : string -> int = "%string_length"
+  external get : string -> int -> char = "%string_safe_get"
+  external set : bytes -> int -> char -> unit = "%string_safe_set"
+  external create : int -> bytes = "caml_create_string"
+  external unsafe_set : bytes -> int -> char -> unit = "%string_unsafe_set"
+  external unsafe_blit : string -> int -> bytes -> int -> int -> unit = 
"caml_blit_string" [@@noalloc]
+  external unsafe_fill : bytes -> int -> int -> char -> unit = 
"caml_fill_string" [@@noalloc]
+end : module type of String)
+
+module XL = (struct
+  include ExtLib.List
+  let sort = List.sort
+end : module type of List)
+
+module XA = (ExtLib.Array : module type of Array)
+module XB = (ExtLib.Buffer : module type of Buffer)
+module XH = (ExtLib.Hashtbl : module type of Hashtbl)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/dune-project 
new/ocaml-extlib-1.7.9/dune-project
--- old/ocaml-extlib-1.7.8/dune-project 1970-01-01 01:00:00.000000000 +0100
+++ new/ocaml-extlib-1.7.9/dune-project 2022-08-05 16:12:23.000000000 +0200
@@ -0,0 +1,2 @@
+(lang dune 1.0)
+(name extlib)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/extlib.opam 
new/ocaml-extlib-1.7.9/extlib.opam
--- old/ocaml-extlib-1.7.8/extlib.opam  1970-01-01 01:00:00.000000000 +0100
+++ new/ocaml-extlib-1.7.9/extlib.opam  2022-08-05 16:12:23.000000000 +0200
@@ -0,0 +1,42 @@
+opam-version: "2.0"
+maintainer: "yg...@autistici.org"
+homepage: "https://github.com/ygrek/ocaml-extlib";
+dev-repo: "git+https://github.com/ygrek/ocaml-extlib.git";
+bug-reports: "https://github.com/ygrek/ocaml-extlib/issues";
+doc: ["https://ygrek.org/p/extlib/doc/";]
+license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
+authors: [
+  "Nicolas Cannasse"
+  "Brian Hurt"
+  "Yamagata Yoriyuki"
+  "Markus Mottl"
+  "Jesse Guardiani"
+  "John Skaller"
+  "Bardur Arantsson"
+  "Janne Hellsten"
+  "Richard W.M. Jones"
+  "ygrek"
+  "Gabriel Scherer"
+  "Pietro Abate"
+]
+depends: [
+  "dune" {>= "1.0"}
+  "ocaml" {>= "4.02"}
+  "cppo" {build}
+]
+synopsis:
+  "A complete yet small extension for OCaml standard library"
+description: """
+The purpose of this library is to add new functions to OCaml standard library
+modules, to modify some functions in order to get better performances or
+safety (tail-recursive) and also to provide new modules which should be useful
+for day to day programming.
+
+Current goal is to maintain compatibility, new software is encouraged to not 
use extlib since stdlib
+is now seeing many additions and improvements which make many parts of extlib 
obsolete.
+For tail-recursion safety consider using other libraries e.g. containers.
+"""
+build: [
+  ["dune" "build" "-p" name "-j" jobs]
+  ["dune" "runtest" "-p" name "-j" jobs] {with-test}
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/opam new/ocaml-extlib-1.7.9/opam
--- old/ocaml-extlib-1.7.8/opam 2021-01-20 00:51:04.000000000 +0100
+++ new/ocaml-extlib-1.7.9/opam 1970-01-01 01:00:00.000000000 +0100
@@ -1,39 +0,0 @@
-opam-version: "2.0"
-maintainer: "yg...@autistici.org"
-homepage: "https://github.com/ygrek/ocaml-extlib";
-dev-repo: "git://github.com/ygrek/ocaml-extlib.git"
-bug-reports: "https://github.com/ygrek/ocaml-extlib/issues";
-doc: ["https://ygrek.org/p/extlib/doc/";]
-license: "LGPL-2.1-only with OCaml-LGPL-linking-exception"
-synopsis: "A complete yet small extension for OCaml standard library"
-authors: [
-  "Nicolas Cannasse"
-  "Brian Hurt"
-  "Yamagata Yoriyuki"
-  "Markus Mottl"
-  "Jesse Guardiani"
-  "John Skaller"
-  "Bardur Arantsson"
-  "Janne Hellsten"
-  "Richard W.M. Jones"
-  "ygrek"
-  "Gabriel Scherer"
-  "Pietro Abate"
-]
-build: [
-  [make "minimal=1" "build"]
-  [make "minimal=1" "test"] {with-test}
-  [make "minimal=1" "doc"] {with-doc}
-]
-install: [ [make "minimal=1" "install"] ]
-depends: [
-  "ocaml"
-  "ocamlfind" {build}
-  "cppo" {build}
-  "base-bytes" {build}
-]
-description: """
-The purpose of this library is to add new functions to OCaml standard library
-modules, to modify some functions in order to get better performances or
-safety (tail-recursive) and also to provide new modules which should be useful
-for day to day programming."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/src/IO.ml 
new/ocaml-extlib-1.7.9/src/IO.ml
--- old/ocaml-extlib-1.7.8/src/IO.ml    2021-01-20 00:51:04.000000000 +0100
+++ new/ocaml-extlib-1.7.9/src/IO.ml    2022-08-05 16:12:23.000000000 +0200
@@ -18,6 +18,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *)
 
+#if OCAML < 407
+module Stdlib = Pervasives
+#endif
+
 open ExtBytes
 
 type input = {
@@ -310,19 +314,19 @@
         End_of_file -> raise No_more_input
     );
     in_input = (fun s p l ->
-      let n = Pervasives.input ch s p l in
+      let n = Stdlib.input ch s p l in
       if n = 0 then raise No_more_input;
       n
     );
-    in_close = (fun () -> Pervasives.close_in ch);
+    in_close = (fun () -> Stdlib.close_in ch);
   }
 
 let output_channel ch =
   {
     out_write = (fun c -> output_char ch c);
-    out_output = (fun s p l -> Pervasives.output ch s p l; l);
-    out_close = (fun () -> Pervasives.close_out ch);
-    out_flush = (fun () -> Pervasives.flush ch);
+    out_output = (fun s p l -> Stdlib.output ch s p l; l);
+    out_close = (fun () -> Stdlib.close_out ch);
+    out_flush = (fun () -> Stdlib.flush ch);
   }
 
 let input_enum e =
@@ -539,7 +543,7 @@
   Int64.float_of_bits (read_i64 ch)
 
 let write_byte o n =
-  (* doesn't test bounds of n in order to keep semantics of 
Pervasives.output_byte *)
+  (* doesn't test bounds of n in order to keep semantics of Stdlib.output_byte 
*)
   write o (Char.unsafe_chr (n land 0xFF))
 
 let write_string o s =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/src/configure.ml 
new/ocaml-extlib-1.7.9/src/configure.ml
--- old/ocaml-extlib-1.7.8/src/configure.ml     2021-01-20 00:51:04.000000000 
+0100
+++ new/ocaml-extlib-1.7.9/src/configure.ml     2022-08-05 16:12:23.000000000 
+0200
@@ -1,18 +1,22 @@
 open Printf
 
-let show_bytes s =
-    let (_:int) = Sys.command (sprintf "ocamlfind query -format %s bytes" 
(Filename.quote s)) in ()
+let cppo_args define var =
+  let version = Scanf.sscanf Sys.ocaml_version "%d.%d." (fun major minor -> 
major * 100 + minor) in
+  var "OCAML" (string_of_int version);
+  if Sys.word_size = 32 then define "WORD_SIZE_32";
+  define "WITH_BYTES"
 
 let () =
   match Sys.argv with
   | [|_;"-cppo-args"|] ->
-    let version = Scanf.sscanf Sys.ocaml_version "%d.%d." (fun major minor -> 
major * 100 + minor) in
-    printf "-D \\\"OCAML %d\\\"\n" version;
-    print_endline (if Sys.word_size = 32 then "-D WORD_SIZE_32 " else "");
-    show_bytes "-D WITH_BYTES";
+    cppo_args (printf "-D %s ") (printf "-D '%s %s' ");
+    exit 0
+  | [|_;"-cppo-args-lines"|] ->
+    let pr fmt = ksprintf print_endline fmt in
+    cppo_args (fun x -> pr "-D"; pr "%s" x) (fun k v -> pr "-D"; pr "%s %s" k 
v);
     exit 0
   | [|_;"-compile-args"|] ->
     if Sys.ocaml_version >= "4.00.0" then print_endline "-bin-annot";
-    show_bytes "-package bytes";
+    print_endline "-package bytes";
     exit 0
   | _ -> failwith "not gonna happen"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/src/dune 
new/ocaml-extlib-1.7.9/src/dune
--- old/ocaml-extlib-1.7.8/src/dune     1970-01-01 01:00:00.000000000 +0100
+++ new/ocaml-extlib-1.7.9/src/dune     2022-08-05 16:12:23.000000000 +0200
@@ -0,0 +1,18 @@
+(library
+ (name extlib)
+ (public_name extlib)
+ (modules :standard \ configure install base64 unzip uChar uTF8)
+ (flags :standard -w -3-6-9-27-32-33-35-39-50)
+ (preprocess
+  (action
+   (run %{bin:cppo} %{read-lines:compat-level} %{input-file})))
+ (wrapped false))
+
+(rule
+ (targets compat-level)
+ (deps
+  (:< configure.ml))
+ (action
+  (with-stdout-to
+   %{targets}
+   (run ocaml %{<} -cppo-args-lines))))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/src/extArray.ml 
new/ocaml-extlib-1.7.9/src/extArray.ml
--- old/ocaml-extlib-1.7.8/src/extArray.ml      2021-01-20 00:51:04.000000000 
+0100
+++ new/ocaml-extlib-1.7.9/src/extArray.ml      2022-08-05 16:12:23.000000000 
+0200
@@ -216,4 +216,10 @@
 #endif
 #endif
 
+#if OCAML >= 500
+external create : int -> 'a -> 'a array = "caml_make_vect"
+let create_matrix = make_matrix
+let make_float = create_float
+#endif
+
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/src/extList.ml 
new/ocaml-extlib-1.7.9/src/extList.ml
--- old/ocaml-extlib-1.7.8/src/extList.ml       2021-01-20 00:51:04.000000000 
+0100
+++ new/ocaml-extlib-1.7.9/src/extList.ml       2022-08-05 16:12:23.000000000 
+0200
@@ -20,6 +20,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *)
 
+#if OCAML < 407
+module Stdlib = Pervasives
+#endif
+
 module List = struct
 
 #if OCAML < 408
@@ -407,7 +411,7 @@
   loop dummy l1 l2;
   dummy.tl
 
-let sort ?(cmp=Pervasives.compare) = List.sort cmp
+let sort ?(cmp=Stdlib.compare) = List.sort cmp
 
 #if OCAML < 406
 let rec init size f =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/src/extString.ml 
new/ocaml-extlib-1.7.9/src/extString.ml
--- old/ocaml-extlib-1.7.8/src/extString.ml     2021-01-20 00:51:04.000000000 
+0100
+++ new/ocaml-extlib-1.7.9/src/extString.ml     2022-08-05 16:12:23.000000000 
+0200
@@ -328,4 +328,17 @@
 
 #endif
 
+#if OCAML >= 500
+let create = Bytes.create
+let set = Bytes.set
+let unsafe_set = Bytes.unsafe_set
+let copy x = Bytes.unsafe_to_string (Bytes.copy (Bytes.unsafe_of_string x))
+let fill = Bytes.fill
+let unsafe_fill = Bytes.unsafe_fill
+let uppercase = uppercase_ascii
+let lowercase = lowercase_ascii
+let capitalize = capitalize_ascii
+let uncapitalize = uncapitalize_ascii
+#endif
+
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/src/extString.mli 
new/ocaml-extlib-1.7.9/src/extString.mli
--- old/ocaml-extlib-1.7.8/src/extString.mli    2021-01-20 00:51:04.000000000 
+0100
+++ new/ocaml-extlib-1.7.9/src/extString.mli    2022-08-05 16:12:23.000000000 
+0200
@@ -51,29 +51,29 @@
 
   val nsplit : string -> string -> string list
   (** [nsplit s sep] splits the string [s] into a list of strings
-    which are separated by [sep].
-                [nsplit "" _] returns the empty list.
-    @raise Invalid_string if [sep] is empty string.  *)
+      which are separated by [sep].
+      [nsplit "" _] returns the empty list.
+      @raise Invalid_string if [sep] is empty string. *)
 
   val join : string -> string list -> string
   (** Same as [concat] *)
 
   val slice : ?first:int -> ?last:int -> string -> string
   (** [slice ?first ?last s] returns a "slice" of the string
-    which corresponds to the characters [s.[first]],
-    [s.[first+1]], ..., [s[last-1]]. Note that the character at
-    index [last] is {b not} included! If [first] is omitted it
-    defaults to the start of the string, i.e. index 0, and if
-    [last] is omitted is defaults to point just past the end of
-    [s], i.e. [length s].  Thus, [slice s] is equivalent to
-    [copy s].
-
-    Negative indexes are interpreted as counting from the end of
-    the string. For example, [slice ~last:-2 s] will return the
-    string [s], but without the last two characters.
+      which corresponds to the characters [s.[first]],
+      [s.[first+1]], ..., [s[last-1]]. Note that the character at
+      index [last] is {b not} included! If [first] is omitted it
+      defaults to the start of the string, i.e. index 0, and if
+      [last] is omitted is defaults to point just past the end of
+      [s], i.e. [length s].  Thus, [slice s] is equivalent to
+      [copy s].
+
+      Negative indexes are interpreted as counting from the end of
+      the string. For example, [slice ~last:-2 s] will return the
+      string [s], but without the last two characters.
 
-    This function {b never} raises any exceptions. If the
-    indexes are out of bounds they are automatically clipped.
+      This function {b never} raises any exceptions. If the
+      indexes are out of bounds they are automatically clipped.
   *)
 
   val lchop : string -> string
@@ -115,50 +115,54 @@
 
   val map : (char -> char) -> string -> string
   (** [map f s] returns a string where all characters [c] in [s] have been
-    replaced by [f c]. **)
+      replaced by [f c]. **)
 
   val mapi : (int -> char -> char) -> string -> string
-  (** [map f s] returns a string where all characters [c] in [s] have been 
replaced by [f i s.\[i\]]. **)
+  (** [map f s] returns a string where all characters [c] in [s] have been 
replaced
+      by [f i s.\[i\]]. **)
 
   val iteri : (int -> char -> unit) -> string -> unit
   (** Call [f i s.\[i\]] for every position [i] in string *)
 
   val fold_left : ('a -> char -> 'a) -> 'a -> string -> 'a
-    (** [fold_left f a s] is
-        [f (... (f (f a s.[0]) s.[1]) ...) s.[n-1]] *)
+  (** [fold_left f a s] is
+      [f (... (f (f a s.[0]) s.[1]) ...) s.[n-1]] *)
+
   val fold_right : (char -> 'a -> 'a) -> string -> 'a -> 'a
-    (** [fold_right f s b] is
-        [f s.[0] (f s.[1] (... (f s.[n-1] b) ...))] *)
+  (** [fold_right f s b] is
+      [f s.[0] (f s.[1] (... (f s.[n-1] b) ...))] *)
 
   val explode : string -> char list
-    (** [explode s] returns the list of characters in the string [s]. *)
+  (** [explode s] returns the list of characters in the string [s]. *)
+
   val implode : char list -> string
-    (** [implode cs] returns a string resulting from concatenating
-        the characters in the list [cs]. *)
+  (** [implode cs] returns a string resulting from concatenating
+      the characters in the list [cs]. *)
 
   val strip : ?chars:string -> string -> string
   (** Returns the string without the chars if they are at the beginning or
-    at the end of the string. By default chars are " \t\r\n". *)
+      at the end of the string. By default chars are " \t\r\n". *)
 
   val exists : string -> string -> bool
   (** [exists str sub] returns true if [sub] is a substring of [str] or
-    false otherwise. *)
+      false otherwise. *)
 
   val replace_chars : (char -> string) -> string -> string
   (** [replace_chars f s] returns a string where all chars [c] of [s] have been
-    replaced by the string returned by [f c]. *)
+      replaced by the string returned by [f c]. *)
 
-        val replace : str:string -> sub:string -> by:string -> bool * string
-        (** [replace ~str ~sub ~by] returns a tuple constisting of a boolean
-    and a string where the first occurrence of the string [sub]
-    within [str] has been replaced by the string [by]. The boolean
-    is true if a subtitution has taken place. *)
+  val replace : str:string -> sub:string -> by:string -> bool * string
+  (** [replace ~str ~sub ~by] returns a tuple constisting of a boolean
+      and a string where the first occurrence of the string [sub]
+      within [str] has been replaced by the string [by]. The boolean
+      is true if a subtitution has taken place. *)
 
-  (** Return a copy of the argument, without leading and trailing
-     whitespace.  The characters regarded as whitespace are: [' '],
-     ['\012'], ['\n'], ['\r'], and ['\t'].
-     (Note that it is different from {!strip} defaults). *)
   val trim : string -> string
+  (** Return a copy of the argument, without leading and trailing
+      whitespace.  The characters regarded as whitespace are:
+      [' '], ['\012'], ['\n'], ['\r'], and ['\t'].
+      (Note that it is different from {!strip} defaults). *)
+
 
   (** {6 Compatibility Functions} *)
 
@@ -169,19 +173,32 @@
 
   val split_on_char : char -> string -> string list
 
+
   (** {6 Older Functions} *)
 
-  (** Please refer to the Ocaml Manual for documentation of these
-    functions. *)
+  (** Please refer to the OCaml Manual for documentation of these
+      functions. *)
 
   val length : string -> int
   val get : string -> int -> char
   val set : Bytes.t -> int -> char -> unit
+#if OCAML >= 402
+  [@@ocaml.deprecated "Use Bytes.set instead."]
+#endif
   val create : int -> Bytes.t
+#if OCAML >= 402
+  [@@ocaml.deprecated "Use Bytes.create instead."]
+#endif
   val make : int -> char -> string
   val copy : string -> string
+#if OCAML >= 402
+  [@@ocaml.deprecated]
+#endif
   val sub : string -> int -> int -> string
   val fill : Bytes.t -> int -> int -> char -> unit
+#if OCAML >= 402
+  [@@ocaml.deprecated "Use Bytes.fill instead."]
+#endif
   val blit : string -> int -> Bytes.t -> int -> int -> unit
   val concat : string -> string list -> string
   val iter : (char -> unit) -> string -> unit
@@ -197,10 +214,26 @@
   val contains : string -> char -> bool
   val contains_from : string -> int -> char -> bool
   val rcontains_from : string -> int -> char -> bool
+
   val uppercase : string -> string
+#if OCAML >= 402
+  [@@ocaml.deprecated "Use String.uppercase_ascii instead."]
+#endif
+
   val lowercase : string -> string
+#if OCAML >= 402
+  [@@ocaml.deprecated "Use String.lowercase_ascii instead."]
+#endif
+
   val capitalize : string -> string
+#if OCAML >= 402
+  [@@ocaml.deprecated "Use String.capitalize_ascii instead."]
+#endif
+
   val uncapitalize : string -> string
+#if OCAML >= 402
+  [@@ocaml.deprecated "Use String.uncapitalize_ascii instead."]
+#endif
 
   type t = string
   val compare : t -> t -> int
@@ -217,7 +250,13 @@
 
   external unsafe_get : string -> int -> char = "%string_unsafe_get"
   val unsafe_set : Bytes.t -> int -> char -> unit
+#if OCAML >= 402
+  [@@ocaml.deprecated]
+#endif
   val unsafe_blit : string -> int -> Bytes.t -> int -> int -> unit
   val unsafe_fill : Bytes.t -> int -> int -> char -> unit
+#if OCAML >= 402
+  [@@ocaml.deprecated]
+#endif
 
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/src/optParse.ml 
new/ocaml-extlib-1.7.9/src/optParse.ml
--- old/ocaml-extlib-1.7.8/src/optParse.ml      2021-01-20 00:51:04.000000000 
+0100
+++ new/ocaml-extlib-1.7.9/src/optParse.ml      2022-08-05 16:12:23.000000000 
+0200
@@ -510,7 +510,7 @@
           | 1 -> '-'
           | _ -> failwith "titled_formatter: Too much indentation"
         in
-        sprintf "%*s%s\n%*s%s\n\n" !indent "" (String.capitalize h) !indent ""
+        sprintf "%*s%s\n%*s%s\n\n" !indent "" (String.capitalize_ascii h) 
!indent ""
           (String.make (String.length h) c)
       in
       let format_usage usage =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/src/refList.ml 
new/ocaml-extlib-1.7.9/src/refList.ml
--- old/ocaml-extlib-1.7.8/src/refList.ml       2021-01-20 00:51:04.000000000 
+0100
+++ new/ocaml-extlib-1.7.9/src/refList.ml       2022-08-05 16:12:23.000000000 
+0200
@@ -116,12 +116,12 @@
 
   let index pred rl =
     let index = ref (-1) in
-    List.find (fun it -> incr index; pred it; ) !rl;
+    let _ = List.find (fun it -> incr index; pred it; ) !rl in
     !index
 
   let index_of rl item =
     let index = ref (-1) in
-    List.find (fun it -> incr index; it = item; ) !rl;
+    let _ = List.find (fun it -> incr index; it = item; ) !rl in
     !index
 
   let at_index rl pos =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/src/uTF8.ml 
new/ocaml-extlib-1.7.9/src/uTF8.ml
--- old/ocaml-extlib-1.7.8/src/uTF8.ml  2021-01-20 00:51:04.000000000 +0100
+++ new/ocaml-extlib-1.7.9/src/uTF8.ml  2022-08-05 16:12:23.000000000 +0200
@@ -18,6 +18,10 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *)
 
+#if OCAML < 407
+module Stdlib = Pervasives
+#endif
+
 open UChar
 
 type t = string
@@ -182,7 +186,7 @@
 
 let iter proc s = iter_aux proc s 0
 
-let compare s1 s2 = Pervasives.compare s1 s2
+let compare s1 s2 = Stdlib.compare s1 s2
 
 exception Malformed_code
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/test/dune 
new/ocaml-extlib-1.7.9/test/dune
--- old/ocaml-extlib-1.7.8/test/dune    1970-01-01 01:00:00.000000000 +0100
+++ new/ocaml-extlib-1.7.9/test/dune    2022-08-05 16:12:23.000000000 +0200
@@ -0,0 +1,9 @@
+(executable
+  (name runner)
+  (flags :standard -w -3-6-35-27)
+  (modules :standard \ test_Unzip test_UTF8 test_Base64)
+  (libraries extlib))
+
+(alias
+ (name runtest)
+ (action (run ./runner.exe)))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/test/runner.ml 
new/ocaml-extlib-1.7.9/test/runner.ml
--- old/ocaml-extlib-1.7.8/test/runner.ml       2021-01-20 00:51:04.000000000 
+0100
+++ new/ocaml-extlib-1.7.9/test/runner.ml       2022-08-05 16:12:23.000000000 
+0200
@@ -4,6 +4,19 @@
   let filter =
     match Array.to_list Sys.argv with
     | [] | [_] -> None
-    | _::l -> Some (List.map String.lowercase l)
+    | _::l -> Some (List.map ExtString.String.lowercase l)
   in
+  let tests = [
+    Test_BitSet.register;
+    Test_Dllist.register;
+    Test_DynArray.register;
+    Test_ExtArray.register;
+    Test_ExtHashtbl.register;
+    Test_ExtList.register;
+    Test_ExtString.register;
+    Test_IO.register;
+  ]
+  in
+  List.iter (fun register -> register ()) tests;
+
   exit (if Util.run_all filter then 0 else 1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/test/std.ml 
new/ocaml-extlib-1.7.9/test/std.ml
--- old/ocaml-extlib-1.7.8/test/std.ml  2021-01-20 00:51:04.000000000 +0100
+++ new/ocaml-extlib-1.7.9/test/std.ml  1970-01-01 01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
-(* check compatibility of interfaces *)
-
-#directory "src";;
-#load "extLib.cma";;
-
-module XS = (struct
-  include ExtLib.String
-  external length : string -> int = "%string_length"
-  external get : string -> int -> char = "%string_safe_get"
-  external set : bytes -> int -> char -> unit = "%string_safe_set"
-  external create : int -> bytes = "caml_create_string"
-  external unsafe_set : bytes -> int -> char -> unit = "%string_unsafe_set"
-  external unsafe_blit : string -> int -> bytes -> int -> int -> unit = 
"caml_blit_string" [@@noalloc]
-  external unsafe_fill : bytes -> int -> int -> char -> unit = 
"caml_fill_string" [@@noalloc]
-end : module type of String)
-
-module XL = (struct
-  include ExtLib.List
-  let sort = List.sort
-end : module type of List)
-
-module XA = (ExtLib.Array : module type of Array)
-module XB = (ExtLib.Buffer : module type of Buffer)
-module XH = (ExtLib.Hashtbl : module type of Hashtbl)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/test/test_BitSet.ml 
new/ocaml-extlib-1.7.9/test/test_BitSet.ml
--- old/ocaml-extlib-1.7.8/test/test_BitSet.ml  2021-01-20 00:51:04.000000000 
+0100
+++ new/ocaml-extlib-1.7.9/test/test_BitSet.ml  2022-08-05 16:12:23.000000000 
+0200
@@ -200,7 +200,7 @@
   assert (expect_exn 
             (fun () ->
                let s = B.create 8 in
-               B.is_set s (-19)))
+               ignore (B.is_set s (-19))))
 
 module IS = Set.Make (struct type t = int let compare = compare end)
 
@@ -383,7 +383,7 @@
   ()
 
 
-let () =
+let register () =
   Util.register "BitSet" [
     "basic", test_bs_1;
     "enum_1", test_enum_1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/test/test_Dllist.ml 
new/ocaml-extlib-1.7.9/test/test_Dllist.ml
--- old/ocaml-extlib-1.7.8/test/test_Dllist.ml  2021-01-20 00:51:04.000000000 
+0100
+++ new/ocaml-extlib-1.7.9/test/test_Dllist.ml  2022-08-05 16:12:23.000000000 
+0200
@@ -54,7 +54,7 @@
   assert (Dllist.get (Dllist.skip lm 1) = "right");
   assert (Dllist.get (Dllist.skip lm (-1)) = "left") (* returned right *)
 
-let () = 
+let register () =
   Util.register "Dllist" [
     "simple", test_simple;
     "regression_1", test_regression_1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/test/test_DynArray.ml 
new/ocaml-extlib-1.7.9/test/test_DynArray.ml
--- old/ocaml-extlib-1.7.8/test/test_DynArray.ml        2021-01-20 
00:51:04.000000000 +0100
+++ new/ocaml-extlib-1.7.9/test/test_DynArray.ml        2022-08-05 
16:12:23.000000000 +0200
@@ -48,7 +48,7 @@
     assert (i = DynArray.length !d);
     (* This is needed in order to expose the memory corruption. *)
     Printf.ifprintf stdout "%d %d\n" i (DynArray.length !d); flush stdout;
-    DynArray.insert !d 0 (Array.create 42 "")
+    DynArray.insert !d 0 (Array.make 42 "")
   done
 
 (* Issue 2: Error in DynArray exponential resizer *)
@@ -64,7 +64,7 @@
     DynArray.add a i
   done
  
-let () = 
+let register () =
   Util.register "DynArray" [
     "triv", test_triv;
     "regr_1", test_regr_1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/test/test_ExtArray.ml 
new/ocaml-extlib-1.7.9/test/test_ExtArray.ml
--- old/ocaml-extlib-1.7.8/test/test_ExtArray.ml        2021-01-20 
00:51:04.000000000 +0100
+++ new/ocaml-extlib-1.7.9/test/test_ExtArray.ml        2022-08-05 
16:12:23.000000000 +0200
@@ -137,7 +137,7 @@
   assert (try let _ = Array.map2 (+) [||] [|1|] in false with Invalid_argument 
_ -> true);
   assert (Array.map2 (-) a b = Array.of_list (List.map2 (-) (Array.to_list a) 
(Array.to_list b)))
 
-let () =
+let register () =
   Util.register "ExtArray" [
     "rev", test_rev;
     "rev_in_place", test_rev_in_place;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/test/test_ExtHashtbl.ml 
new/ocaml-extlib-1.7.9/test/test_ExtHashtbl.ml
--- old/ocaml-extlib-1.7.8/test/test_ExtHashtbl.ml      2021-01-20 
00:51:04.000000000 +0100
+++ new/ocaml-extlib-1.7.9/test/test_ExtHashtbl.ml      2022-08-05 
16:12:23.000000000 +0200
@@ -29,5 +29,5 @@
   assert (find h "test" = Some 1);
   assert (find h1 "test" = Some 2)
 
-let () = 
+let register () =
   Util.register1 "ExtHashtbl" "map" test_map
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/test/test_ExtList.ml 
new/ocaml-extlib-1.7.9/test/test_ExtList.ml
--- old/ocaml-extlib-1.7.8/test/test_ExtList.ml 2021-01-20 00:51:04.000000000 
+0100
+++ new/ocaml-extlib-1.7.9/test/test_ExtList.ml 2022-08-05 16:12:23.000000000 
+0200
@@ -67,10 +67,10 @@
             let rnd_elem = Random.int (List.length lst) in
             assert (check_exn 
                       (fun () -> 
-                         List.find_exc (fun e -> e = List.length lst) 
Test_Exception lst));
+                         ignore (List.find_exc (fun e -> e = List.length lst) 
Test_Exception lst)));
             assert (not (check_exn 
                            (fun () -> 
-                              List.find_exc (fun e -> e = rnd_elem) 
Test_Exception lst)))
+                              ignore (List.find_exc (fun e -> e = rnd_elem) 
Test_Exception lst))))
       end
     done
   with _ -> assert false
@@ -162,7 +162,7 @@
   let l = List.make 10_000_000 1 in
   assert (List.length l = 10_000_000)
 
-let () =
+let register () =
   Util.register "ExtList" [
     "iteri", test_iteri;
     "mapi", test_mapi;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/test/test_ExtString.ml 
new/ocaml-extlib-1.7.9/test/test_ExtString.ml
--- old/ocaml-extlib-1.7.8/test/test_ExtString.ml       2021-01-20 
00:51:04.000000000 +0100
+++ new/ocaml-extlib-1.7.9/test/test_ExtString.ml       2022-08-05 
16:12:23.000000000 +0200
@@ -80,7 +80,7 @@
         (* Insert separator and split based on that *)
         let modified =
           let b = Bytes.of_string s' in
-          b.[rpos] <- '|';
+          Bytes.set b rpos '|';
           Bytes.to_string b
         in
         let (half1, half2) = String.split modified "|" in
@@ -123,7 +123,7 @@
   assert (S.nsplit s "te" = ["";"stsui";""]);
   assert (try let _ = S.nsplit s "" in false with Invalid_string -> true)
 
-let () = 
+let register () =
   Util.register "ExtString" [
     "starts_with", t_starts_with;
     "ends_with", t_ends_with;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/test/test_IO.ml 
new/ocaml-extlib-1.7.9/test/test_IO.ml
--- old/ocaml-extlib-1.7.8/test/test_IO.ml      2021-01-20 00:51:04.000000000 
+0100
+++ new/ocaml-extlib-1.7.9/test/test_IO.ml      2022-08-05 16:12:23.000000000 
+0200
@@ -104,7 +104,7 @@
   assert (value = (0b111_1111_1111_1111_1111_1111_1111_1111));
   ()
 
-let () =
+let register () =
   Util.register1 "IO" "i32" test_i32;
   Util.register1 "IO" "real_i32" test_real_i32;
   Util.register1 "IO" "i31" test_i31;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ocaml-extlib-1.7.8/test/util.ml 
new/ocaml-extlib-1.7.9/test/util.ml
--- old/ocaml-extlib-1.7.8/test/util.ml 2021-01-20 00:51:04.000000000 +0100
+++ new/ocaml-extlib-1.7.9/test/util.ml 2022-08-05 16:12:23.000000000 +0200
@@ -29,20 +29,20 @@
 
 let random_string () = 
   let len = Random.int 256 in
-  let str = String.create len in
+  let str = Bytes.create len in
   if len > 0 then
     for i = 0 to (len-1) do
-      str.[i] <- random_char ()
+      Bytes.set str i (random_char ())
     done;
   Bytes.unsafe_to_string str
 
 
 let random_string_len len = 
   let len = len in
-  let str = String.create len in
+  let str = Bytes.create len in
   if len > 0 then
     for i = 0 to (len-1) do
-      str.[i] <- random_char ()
+      Bytes.set str i (random_char ())
     done;
   Bytes.unsafe_to_string str
 
@@ -90,7 +90,7 @@
   let allowed name =
     match filter with
     | None -> true
-    | Some l -> List.mem (String.lowercase name) l
+    | Some l -> List.mem (ExtString.String.lowercase name) l
   in
   g_test_run_count := 0;
   g_test_success_count := 0;

Reply via email to