mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
common/mlstdutils: Drop our implementations of functions now in OCaml 4.01.
We reimplemented some functions which can now be found in the OCaml stdlib since 4.01 (or earlier). The functions I have dropped are: - String.map - |> - iteri (replaced by List.iteri) - mapi (replaced by List.mapi) Note that our definition of iteri was slightly wrong: the type of the function parameter was too wide, allowing (int -> 'a -> 'b) instead of (int -> 'a -> unit). I also added this new function to the Std_utils.String module as an export from stdlib String: - String.iteri Thanks: Pino Toscano
This commit is contained in:
@@ -330,7 +330,7 @@ public class GuestFS {
|
||||
pr " /* Unpack optional args. */\n";
|
||||
pr " Object _optobj;\n";
|
||||
pr " long _optargs_bitmask = 0;\n";
|
||||
iteri (
|
||||
List.iteri (
|
||||
fun i argt ->
|
||||
let t, boxed_t, convert, n, default =
|
||||
match argt with
|
||||
|
||||
Reference in New Issue
Block a user