X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=XMLTree.h;h=3bfb7a401db4e001ce2fa2cbb2de8a15c1f906a9;hb=4bd816265ae88b4e1631634260384baa559f8967;hp=d446ab122d2cd37cd0ef9b24c1d66e18e482008b;hpb=3c8f8af6704ca98b36b503878058aa0619806dad;p=SXSI%2FXMLTree.git diff --git a/XMLTree.h b/XMLTree.h index d446ab1..3bfb7a4 100644 --- a/XMLTree.h +++ b/XMLTree.h @@ -84,6 +84,8 @@ class XMLTree { /** Tag sequence represented with a data structure for rank and select */ static_sequence *Tags; + uint * tags_fix; + uint tags_blen, tags_len; /** The texts in the XML document */ TextCollection *Text; @@ -401,7 +403,9 @@ public: } uchar* GetCachedText(DocID d) { - return (uchar*) (CachedText.at(d).c_str()); + uchar * str = (uchar*) calloc(sizeof(char),(CachedText.at(d).size() + 1)); + strcpy((char*) str,(const char*) CachedText.at(d).c_str()); + return (uchar*) (str); } TextCollection *getTextCollection() {