X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Ffilter_multi.cpp;h=ca6616840633f69b578624cdc71e4a296a4476d9;hb=b1d299c751b81d4c9bc113a0300daf0667063710;hp=b1452c33099c046d3a5472ef87f56e8e60ebe8e4;hpb=2495ef28534a85e3f425301c053a48de7f7a53e6;p=metaproxy-moved-to-github.git diff --git a/src/filter_multi.cpp b/src/filter_multi.cpp index b1452c3..ca66168 100644 --- a/src/filter_multi.cpp +++ b/src/filter_multi.cpp @@ -957,15 +957,13 @@ Z_Entry *yf::Multi::ScanTermInfo::get_entry(ODR odr) t->byAttributes = 0; t->otherTermInfo = 0; t->globalOccurrences = odr_intdup(odr, m_count); - t->term = (Z_Term *) - odr_malloc(odr, sizeof(*t->term)); + t->term = (Z_Term *) odr_malloc(odr, sizeof(*t->term)); t->term->which = Z_Term_general; - Odr_oct *o; - t->term->u.general = o = (Odr_oct *)odr_malloc(odr, sizeof(Odr_oct)); - - o->len = o->size = m_norm_term.size(); - o->buf = (unsigned char *) odr_malloc(odr, o->len); - memcpy(o->buf, m_norm_term.c_str(), o->len); + t->term->u.general = odr_create_Odr_oct(odr, +#if YAZ_VERSIONL < 0x50000 + (unsigned char *) +#endif + m_norm_term.c_str(), m_norm_term.size()); return e; }