Removed testing cruft
[SXSI/xpathcomp.git] / OCamlDriver.cpp
index 09175ba..a77afa4 100644 (file)
@@ -136,11 +136,20 @@ extern "C" CAMLprim value caml_text_collection_get_text(value tree, value id){
 extern "C" CAMLprim value caml_text_collection_get_cached_text(value tree, value id){
   CAMLparam2(tree,id);
   CAMLlocal1(str);
-  const char* txt = (const char*) XMLTREE(tree)->GetCachedText((DocID) Int_val(id));
+  char* txt = (char*) XMLTREE(tree)->GetCachedText((DocID) Int_val(id));
   str = caml_copy_string(txt);
+  free(txt);
   CAMLreturn (str);
 }
 
+extern "C" CAMLprim value caml_text_collection_size(value tree){
+  CAMLparam1(tree);
+  //  CAMLreturn (Val_int( XMLTREE(tree)->CachedText.size()));
+  NOT_IMPLEMENTED("text_collection_size");
+  CAMLreturn (Val_unit);
+}
+
+
 
 extern "C" CAMLprim value caml_text_collection_empty_text(value tree,value id){
   CAMLparam2(tree,id);
@@ -158,6 +167,13 @@ extern "C" CAMLprim value caml_text_collection_count_contains(value tree,value s
   uchar * cstr = (uchar *) String_val(str);  
   CAMLreturn (Val_int((XMLTREE(tree)->CountContains(cstr))));
   
+}
+extern "C" CAMLprim value caml_text_collection_count(value tree,value str){
+  CAMLparam2(tree,str);
+  //uchar * cstr = (uchar *) String_val(str);
+  NOT_IMPLEMENTED("text_collection_count");
+  CAMLreturn (Val_unit);
+  
 }
 
 extern "C" CAMLprim value caml_text_collection_contains(value tree,value str){