Add function to cast tags to integers.
authorKim Nguyễn <kn@lri.fr>
Wed, 22 Feb 2012 11:03:07 +0000 (12:03 +0100)
committerKim Nguyễn <kn@lri.fr>
Wed, 22 Feb 2012 11:03:07 +0000 (12:03 +0100)
src/tag.ml
src/tag.mli

index 2cc1663..effe9c3 100644 (file)
@@ -8,7 +8,7 @@
 
 
 type t = int
-
+external to_int : t -> int = "%identity"
 type operations = {
   tag :  string -> t;
   to_string : t ->string;
index 04254e0..7e742c1 100644 (file)
@@ -6,7 +6,7 @@ type operations = {
   translate : t -> t
 }
 
-
+external  to_int : t -> int = "%identity"
 val document_node : t
 val attribute : t
 val pcdata : t