Skip to content

Commit 51e15f2

Browse files
committed
Hygiene: Expose ListStorageType
Capnp.MessageSig.S is public (aka. part of wrapped capnp.ml), and has a ListStorage module. But ListStorage.t has a storage_type field of type 'Capnp.MessageSig.ListStorageType.t' that is not public. This commit makes ListStorageType public.
1 parent 20f34db commit 51e15f2

File tree

4 files changed

+26
-10
lines changed

4 files changed

+26
-10
lines changed

CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ New features:
44

55
- Expose module type `MESSAGE_STORAGE` which was used as a `Capnp.Message.Make`
66
functor parameter but was previously hidden in `Capnp__MessageStorage.S`.
7+
Expose module `ListStorageType` that was previously hidden in
8+
`Capnp.MessageSig.ListStorageType`.
79
Stop leaking `Uint32` and `Uint64` in module types. (@jonahbeckford #91)
810

911
# v3.6.0

src/runtime/capnp.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ module Array = CArray
3737
module BytesStorage = BytesStorage
3838
module BytesMessage = Message.BytesMessage
3939
module Codecs = Codecs
40+
module ListStorageType = ListStorageType
4041
module RPC = RPC
4142
module Runtime = struct
4243
module BuilderInc = BuilderInc

src/runtime/listStorageType.ml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,13 @@ let sizeof_uint64 = 8
33

44
type t =
55
| Empty
6-
(** list(void), no storage required *)
7-
86
| Bit
9-
(** list(bool), tightly packed bits *)
10-
117
| Bytes1
128
| Bytes2
139
| Bytes4
1410
| Bytes8
15-
(** either primitive values or a data-only struct *)
16-
1711
| Pointer
18-
(** either a pointer to an external object, or a pointer-only struct *)
19-
2012
| Composite of int * int
21-
(** typical struct; parameters are per-element word size for data section
22-
and pointers section, respectively *)
2313

2414
let get_byte_count storage_type =
2515
match storage_type with

src/runtime/listStorageType.mli

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
(** @canonical Capnp.ListStorageType *)
2+
3+
type t =
4+
| Empty
5+
(** list(void), no storage required *)
6+
7+
| Bit
8+
(** list(bool), tightly packed bits *)
9+
10+
| Bytes1
11+
| Bytes2
12+
| Bytes4
13+
| Bytes8
14+
(** either primitive values or a data-only struct *)
15+
16+
| Pointer
17+
(** either a pointer to an external object, or a pointer-only struct *)
18+
19+
| Composite of int * int
20+
(** typical struct; parameters are per-element word size for data section
21+
and pointers section, respectively *)
22+
23+
val get_byte_count : t -> int

0 commit comments

Comments
 (0)