Fix a nasty bug where the wrong pointer was passed to the C side.
[SXSI/xpathcomp.git] / src / tree.ml
index e729034..ef2a082 100644 (file)
@@ -633,7 +633,7 @@ let load ?(sample=64) ?(load_text=true) str =
   let _ = set_binary_mode_in in_c true in
   let load_table () =
     (let ms = input_line in_c in if ms <> magic_string then failwith "Invalid index file");
-    (let vs = input_line in_c in if vs <> version_string then failwith "Invalid version file");
+    (let vs = input_line in_c in if vs <> version_string then failwith "Unsupported index format");
     let c = load_tag_table in_c in
     let s = load_tag_table in_c in
     let d = load_tag_table in_c in
@@ -809,3 +809,6 @@ Largest tag id: %i@\n@?"
 ;;
 
 *)
+
+type tree_pointer = tree
+let get_tree_pointer x = x.doc