Commit bc8567a9 authored by Pietro Abate's avatar Pietro Abate

[r2005-06-18 07:09:46 by afrisch] Empty log message

Original author: afrisch
Date: 2005-06-18 07:09:46+00:00
parent ec9eb3bd
......@@ -22,11 +22,8 @@ let split_qname s =
module P = Upool.Make(U)
(* module P = Pool.Make(U) *)
include P
let value = get
let empty = mk empty_str
let xml_ns = mk (U.mk "http://www.w3.org/XML/1998/namespace")
let xsd_ns = mk (U.mk "http://www.w3.org/2001/XMLSchema")
......
......@@ -9,10 +9,12 @@ module type S = sig
val dummy: t
val mk: value -> t
val get: t -> value
val value: t -> value
val extract: unit -> value list
val intract: value list -> unit
val from_int: int -> t
end
module HInt = Hashtbl.Make(struct type t = int
......@@ -41,16 +43,18 @@ module Make(X : Custom.T) = struct
with Not_found -> HInt.add pool h v);
h
let get h =
let value h =
assert (h != dummy);
HInt.find pool h
let extract () = HInt.fold (fun _ v accu -> v::accu) pool []
let intract = List.iter (fun v -> ignore (mk v))
let serialize s h = X.serialize s (get h)
let serialize s h = X.serialize s (value h)
let deserialize s = mk (X.deserialize s)
let check _ = ()
let dump ppf _ = ()
let from_int i = i
end
......@@ -9,10 +9,12 @@ module type S = sig
val dummy: t
val mk: value -> t
val get: t -> value
val value: t -> value
val extract: unit -> value list
val intract: value list -> unit
val from_int: int -> t
end
module Make(X : Custom.T) : S with type value = X.t
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment