Expose the internal structure of Hconsed value
[SXSI/xpathcomp.git] / OCamlDriver.cpp
index baf9698..e231a45 100644 (file)
@@ -150,16 +150,14 @@ extern "C" CAMLprim value caml_text_collection_get_text(value tree, value id){
   CAMLlocal1(str);
   uchar* txt = XMLTREE(tree)->GetText((DocID) Int_val(id));
   str = caml_copy_string((const char*)txt);
-  delete (txt);
   CAMLreturn (str);
 }
 
 extern "C" CAMLprim value caml_text_collection_get_cached_text(value tree, value id){
   CAMLparam2(tree,id);
   CAMLlocal1(str);
-  char* txt = (char*) XMLTREE(tree)->GetCachedText((DocID) Int_val(id));
+  char* txt = (char*) XMLTREE(tree)->GetText((DocID) Int_val(id));
   str = caml_copy_string(txt);
-  free(txt);
   CAMLreturn (str);
 }