Skip to content

Commit

Permalink
prepare for 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Jul 7, 2022
1 parent 6a415e9 commit 249dc35
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 15 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## 3.9

- feat: add `Containers_cbor` module
- feat(CCInt32): add popcount function
- feat(CCInt64): add `popcount` operation
- CCBV:
* more extensive test suite
* use `bytes` underneath, not an array of integers
- add `containers_testlib`, removing qtest and ounit.

- fix: handle uppercase in string/hex

## 3.8

- add `Containers_bencode` for lightweight (de)ser
Expand Down
5 changes: 3 additions & 2 deletions containers-data.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opam-version: "2.0"
version: "3.8"
version: "3.9"
author: "Simon Cruanes"
maintainer: "simon.cruanes.2007@m4x.org"
synopsis: "A set of advanced datatypes for containers"
Expand All @@ -14,7 +14,8 @@ depends: [
"dune" { >= "2.0" }
"containers" { = version }
"seq"
"qcheck-core" { with-test }
(("ocaml" {with-test & < "4.08"} & "qcheck-core" {>= "0.17" & with-test})
| ("ocaml" {with-test & >= "4.08"} & "qcheck-core" {>= "0.18" & with-test}))
"iter" { with-test }
"gen" { with-test }
#"mdx" { with-test & >= "1.5.0" & < "2.0.0" }
Expand Down
5 changes: 3 additions & 2 deletions containers-thread.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opam-version: "2.0"
version: "3.8"
version: "3.9"
author: "Simon Cruanes"
maintainer: "simon.cruanes.2007@m4x.org"
license: "BSD-2-Clause"
Expand All @@ -16,7 +16,8 @@ depends: [
"dune-configurator"
"containers" { = version }
"iter" { with-test }
"qcheck-core" { with-test }
(("ocaml" {with-test & < "4.08"} & "qcheck-core" {>= "0.17" & with-test})
| ("ocaml" {with-test & >= "4.08"} & "qcheck-core" {>= "0.18" & with-test}))
"uutf" { with-test }
"odoc" { with-doc }
]
Expand Down
5 changes: 3 additions & 2 deletions containers.opam
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
opam-version: "2.0"
name: "containers"
version: "3.8"
version: "3.9"
author: "Simon Cruanes"
maintainer: "simon.cruanes.2007@m4x.org"
license: "BSD-2-Clause"
Expand All @@ -16,7 +16,8 @@ depends: [
"dune-configurator"
"seq" # compat
"either" # compat
"qcheck-core" { >= "0.14" & with-test }
(("ocaml" {with-test & < "4.08"} & "qcheck-core" {>= "0.17" & with-test})
| ("ocaml" {with-test & >= "4.08"} & "qcheck-core" {>= "0.18" & with-test}))
"yojson" { with-test }
"iter" { with-test }
"gen" { with-test }
Expand Down
2 changes: 1 addition & 1 deletion src/cbor/containers_cbor.mli
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{b note} this is only available on OCaml >= 4.08. Below that, the module
is empty.
@since NEXT_RELEASE
@since 3.9
*)

type t =
Expand Down
1 change: 1 addition & 0 deletions src/cbor/tests/dune
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
(rule
(alias runtest)
(deps t_appendix_a.exe appendix_a.json)
(package containers)
(action
(run ./t_appendix_a.exe ./appendix_a.json)))
4 changes: 2 additions & 2 deletions src/core/CCEqualLabels.mli
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ val map : f:('a -> 'b) -> 'b t -> 'a t

val always_eq : _ t
(** Always returns true. All values are equal.
@since NEXT_RELEASE *)
@since 3.9 *)

val never_eq : _ t
(** Always returns false. No values are, so this
is not even reflexive (i.e. [x=x] is false).
Be careful!
@since NEXT_RELEASE *)
@since 3.9 *)

module Infix : sig
val ( >|= ) : 'b t -> ('a -> 'b) -> 'a t
Expand Down
2 changes: 1 addition & 1 deletion src/core/CCInt32.mli
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ val pow : t -> t -> t

val popcount : t -> int
(** Number of bits set to 1.
@since NEXT_RELEASE *)
@since 3.9 *)

val floor_div : t -> t -> t
(** [floor_div x n] is integer division rounding towards negative infinity.
Expand Down
2 changes: 1 addition & 1 deletion src/core/CCInt64.mli
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ val hash : t -> int

val popcount : t -> int
(** Number of bits set to 1.
@since NEXT_RELEASE *)
@since 3.9 *)

val sign : t -> int
(** [sign x] return [0] if [x = 0], [-1] if [x < 0] and [1] if [x > 0].
Expand Down
8 changes: 4 additions & 4 deletions src/data/CCBV.mli
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ val create : size:int -> bool -> t
val init : int -> (int -> bool) -> t
(** [init len f] initializes a bitvector of length [len], where bit [i]
is true iff [f i] is.
@since NEXT_RELEASE *)
@since 3.9 *)

val copy : t -> t
(** Copy of bitvector. *)
Expand Down Expand Up @@ -55,7 +55,7 @@ val resize_minimize_memory : t -> int -> unit
(** Same as {!resize}, but this can also shrink the underlying
array if this reduces the size.
@raise Invalid_argument on negative sizes.
@since NEXT_RELEASE *)
@since 3.9 *)

val is_empty : t -> bool
(** Are there any true bits? *)
Expand All @@ -71,7 +71,7 @@ val reset : t -> int -> unit

val set_bool : t -> int -> bool -> unit
(** Set or reset [i]-th bit.
@since NEXT_RELEASE *)
@since 3.9 *)

val flip : t -> int -> unit
(** Flip i-th bit, extending the bitvector if needed. *)
Expand All @@ -81,7 +81,7 @@ val clear : t -> unit

val clear_and_shrink : t -> unit
(** Set every bit to 0, and set length to 0.
@since NEXT_RELEASE *)
@since 3.9 *)

val iter : t -> (int -> bool -> unit) -> unit
(** Iterate on all bits. *)
Expand Down

0 comments on commit 249dc35

Please sign in to comment.