X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=OCamlDriver.cpp;h=9df73d608bffb330c9c90a664aacb2cd494f27cd;hb=3445f7f08f15fe41e0d1bfaaabaacf60cdc10b61;hp=0d0a24cbbf04d8592ed95d566a31726428cacd65;hpb=f0557f21878be17ddc75b1bc8f4f86da68c8e604;p=SXSI%2Fxpathcomp.git diff --git a/OCamlDriver.cpp b/OCamlDriver.cpp index 0d0a24c..9df73d6 100644 --- a/OCamlDriver.cpp +++ b/OCamlDriver.cpp @@ -150,7 +150,6 @@ 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); } @@ -159,7 +158,6 @@ extern "C" CAMLprim value caml_text_collection_get_cached_text(value tree, value CAMLlocal1(str); char* txt = (char*) XMLTREE(tree)->GetText((DocID) Int_val(id)); str = caml_copy_string(txt); - free(txt); CAMLreturn (str); } @@ -263,7 +261,7 @@ extern "C" CAMLprim value caml_xml_tree_next_sibling(value tree, value id){ } extern "C" CAMLprim value caml_xml_tree_next_element(value tree, value id){ - return(Val_int (XMLTREE(tree)->NextSibling(TREENODEVAL(id)))); + return(Val_int (XMLTREE(tree)->NextElement(TREENODEVAL(id)))); } extern "C" CAMLprim value caml_xml_tree_tagged_sibling(value tree, value id, value tag){