Merge branch 'handle-stdout'
[SXSI/xpathcomp.git] / src / node.ml
1 type +'a t = int
2
3
4 let nil = ~-1
5 let null = 0
6 let is_nil x = x == ~-1
7 let print fmt = Format.fprintf fmt "%i"
8
9 let equal (x : 'a t) (y : 'a t) = x == y
10 external ibool : bool -> int = "%identity"
11 let compare (x : 'a t) (y : 'a t) = ibool (y > x) - ibool (y < x)
12 let hash (x : 'a t) = x land 0x7fffffff
13
14 external to_int : 'a t -> int = "%identity"
15 external of_int : int -> 'a t = "%identity"