diff --git a/CHANGES b/CHANGES index 82e0333..df5d96c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +0.3.2 () +===== +* Fix compilation with OCaml >= 4.06 + 0.3.1 (03-08-2015) ===== * Switch to Bytes API. diff --git a/configure.ac b/configure.ac index 45e4b21..d807453 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ # check for one particular file of the sources -AC_INIT([ocaml-lastfm],[0.3.1],[savonet-users@lists.sourceforge.net]) +AC_INIT([ocaml-lastfm],[0.3.2],[savonet-users@lists.sourceforge.net]) VERSION=$PACKAGE_VERSION AC_SUBST(VERSION) diff --git a/m4 b/m4 index 4462789..65ecf99 160000 --- a/m4 +++ b/m4 @@ -1 +1 @@ -Subproject commit 4462789c5a4bb4633ecd993f2240046cb8c46de5 +Subproject commit 65ecf99ebda43e1eb88f278f463370b9738690b0 diff --git a/src/lastfm_generic.ml b/src/lastfm_generic.ml index 157579c..1a68a3c 100644 --- a/src/lastfm_generic.ml +++ b/src/lastfm_generic.ml @@ -57,9 +57,9 @@ let decode64 s = | _ -> failwith "decode64: invalid encoding" in let len = List.length result in - let s = String.make len ' ' in - ignore (List.fold_left (fun i c -> s.[i] <- c ; i-1) (len-1) result) ; - s + let s = Bytes.make len ' ' in + ignore (List.fold_left (fun i c -> Bytes.set s i c ; i-1) (len-1) result) ; + Bytes.to_string s let parse_url s = let f h p r = @@ -109,7 +109,7 @@ let to_hex2 = let s = Bytes.create 2 in Bytes.set s 0 (hex_digits.( (k lsr 4) land 15 )) ; Bytes.set s 1 (hex_digits.( k land 15 )) ; - s + Bytes.to_string s let url_encode ?(plus=true) s = Pcre.substitute