@@ -80,6 +80,7 @@ module type S = sig
80
80
81
81
val clean : 'a t -> unit
82
82
(* * remove all dead bindings. Done automatically during automatic resizing. *)
83
+
83
84
val stats_alive : 'a t -> Hashtbl .statistics
84
85
(* * same as {!Hashtbl.SeededS.stats} but only count the alive bindings *)
85
86
end
@@ -93,6 +94,7 @@ module type SeededS = sig
93
94
include Hashtbl. SeededS
94
95
val clean : 'a t -> unit
95
96
(* * remove all dead bindings. Done automatically during automatic resizing. *)
97
+
96
98
val stats_alive : 'a t -> Hashtbl .statistics
97
99
(* * same as {!Hashtbl.SeededS.stats} but only count the alive bindings *)
98
100
end
@@ -192,43 +194,58 @@ module K2 : sig
192
194
193
195
val get_key1 : ('k1 ,'k2,'d) t -> 'k1 option
194
196
(* * Same as {!Ephemeron.K1.get_key} *)
197
+
195
198
val get_key1_copy : ('k1 ,'k2,'d) t -> 'k1 option
196
199
(* * Same as {!Ephemeron.K1.get_key_copy} *)
200
+
197
201
val set_key1 : ('k1 ,'k2,'d) t -> 'k1 -> unit
198
202
(* * Same as {!Ephemeron.K1.set_key} *)
203
+
199
204
val unset_key1 : ('k1 ,'k2,'d) t -> unit
200
205
(* * Same as {!Ephemeron.K1.unset_key} *)
206
+
201
207
val check_key1 : ('k1 ,'k2,'d) t -> bool
202
208
(* * Same as {!Ephemeron.K1.check_key} *)
203
209
204
210
val get_key2 : ('k1 ,'k2,'d) t -> 'k2 option
205
211
(* * Same as {!Ephemeron.K1.get_key} *)
212
+
206
213
val get_key2_copy : ('k1 ,'k2,'d) t -> 'k2 option
207
214
(* * Same as {!Ephemeron.K1.get_key_copy} *)
215
+
208
216
val set_key2 : ('k1 ,'k2,'d) t -> 'k2 -> unit
209
217
(* * Same as {!Ephemeron.K1.get_key} *)
218
+
210
219
val unset_key2 : ('k1 ,'k2,'d) t -> unit
211
220
(* * Same as {!Ephemeron.K1.unset_key} *)
221
+
212
222
val check_key2 : ('k1 ,'k2,'d) t -> bool
213
223
(* * Same as {!Ephemeron.K1.check_key} *)
214
224
215
- val blit_key1 : ('k1 ,_,_) t -> ('k1 ,_,_) t -> unit
225
+ val blit_key1 : ('k1 ,_,_) t -> ('k1 ,_,_) t -> unit
216
226
(* * Same as {!Ephemeron.K1.blit_key} *)
217
- val blit_key2 : (_ ,'k2,_) t -> (_ ,'k2,_) t -> unit
227
+
228
+ val blit_key2 : (_ ,'k2,_) t -> (_ ,'k2,_) t -> unit
218
229
(* * Same as {!Ephemeron.K1.blit_key} *)
219
- val blit_key12 : ('k1 ,'k2,_) t -> ('k1 ,'k2,_) t -> unit
230
+
231
+ val blit_key12 : ('k1 ,'k2,_) t -> ('k1 ,'k2,_) t -> unit
220
232
(* * Same as {!Ephemeron.K1.blit_key} *)
221
233
222
234
val get_data : ('k1 ,'k2,'d) t -> 'd option
223
235
(* * Same as {!Ephemeron.K1.get_data} *)
236
+
224
237
val get_data_copy : ('k1 ,'k2,'d) t -> 'd option
225
238
(* * Same as {!Ephemeron.K1.get_data_copy} *)
239
+
226
240
val set_data : ('k1 ,'k2,'d) t -> 'd -> unit
227
241
(* * Same as {!Ephemeron.K1.set_data} *)
242
+
228
243
val unset_data : ('k1 ,'k2,'d) t -> unit
229
244
(* * Same as {!Ephemeron.K1.unset_data} *)
245
+
230
246
val check_data : ('k1 ,'k2,'d) t -> bool
231
247
(* * Same as {!Ephemeron.K1.check_data} *)
248
+
232
249
val blit_data : ('k1 ,'k2,'d) t -> ('k1 ,'k2,'d) t -> unit
233
250
(* * Same as {!Ephemeron.K1.blit_data} *)
234
251
@@ -256,28 +273,37 @@ module Kn : sig
256
273
257
274
val get_key : ('k ,'d) t -> int -> 'k option
258
275
(* * Same as {!Ephemeron.K1.get_key} *)
276
+
259
277
val get_key_copy : ('k ,'d) t -> int -> 'k option
260
278
(* * Same as {!Ephemeron.K1.get_key_copy} *)
279
+
261
280
val set_key : ('k ,'d) t -> int -> 'k -> unit
262
281
(* * Same as {!Ephemeron.K1.set_key} *)
282
+
263
283
val unset_key : ('k ,'d) t -> int -> unit
264
284
(* * Same as {!Ephemeron.K1.unset_key} *)
285
+
265
286
val check_key : ('k ,'d) t -> int -> bool
266
287
(* * Same as {!Ephemeron.K1.check_key} *)
267
288
268
- val blit_key : ('k ,_) t -> int -> ('k ,_) t -> int -> int -> unit
289
+ val blit_key : ('k ,_) t -> int -> ('k ,_) t -> int -> int -> unit
269
290
(* * Same as {!Ephemeron.K1.blit_key} *)
270
291
271
292
val get_data : ('k ,'d) t -> 'd option
272
293
(* * Same as {!Ephemeron.K1.get_data} *)
294
+
273
295
val get_data_copy : ('k ,'d) t -> 'd option
274
296
(* * Same as {!Ephemeron.K1.get_data_copy} *)
297
+
275
298
val set_data : ('k ,'d) t -> 'd -> unit
276
299
(* * Same as {!Ephemeron.K1.set_data} *)
300
+
277
301
val unset_data : ('k ,'d) t -> unit
278
302
(* * Same as {!Ephemeron.K1.unset_data} *)
303
+
279
304
val check_data : ('k ,'d) t -> bool
280
305
(* * Same as {!Ephemeron.K1.check_data} *)
306
+
281
307
val blit_data : ('k ,'d) t -> ('k ,'d) t -> unit
282
308
(* * Same as {!Ephemeron.K1.blit_data} *)
283
309
@@ -307,11 +333,13 @@ module GenHashTable: sig
307
333
sig
308
334
type t
309
335
(* * keys *)
336
+
310
337
type 'a container
311
338
(* * contains keys and the associated data *)
312
339
313
340
val hash : int -> t -> int
314
341
(* * same as {!Hashtbl.SeededHashedType} *)
342
+
315
343
val equal : 'a container -> t -> equal
316
344
(* * equality predicate used to compare a key with the one in a
317
345
container. Can return [EDead] if the keys in the container are
@@ -320,12 +348,16 @@ module GenHashTable: sig
320
348
val create : t -> 'a -> 'a container
321
349
(* * [create key data] creates a container from
322
350
some initials keys and one data *)
351
+
323
352
val get_key : 'a container -> t option
324
353
(* * [get_key cont] returns the keys if they are all alive *)
354
+
325
355
val get_data : 'a container -> 'a option
326
356
(* * [get_data cont] return the data if it is alive *)
357
+
327
358
val set_key_data : 'a container -> t -> 'a -> unit
328
359
(* * [set_key_data cont] modify the key and data *)
360
+
329
361
val check_key : 'a container -> bool
330
362
(* * [check_key cont] checks if all the keys contained in the data
331
363
are alive *)
0 commit comments