X-Git-Url: http://git.indexdata.com/?p=yazpp-moved-to-github.git;a=blobdiff_plain;f=zlint%2Fzlint.cpp;h=7ed83b768346f729d9b4cd6354379ec196c36873;hp=a0ad235a65680f7bf93433284a8d7dfdffe720e9;hb=HEAD;hpb=6b50fe651b6f6e83f4bfa9c4f00a793a40ed423c diff --git a/zlint/zlint.cpp b/zlint/zlint.cpp index a0ad235..7ed83b7 100644 --- a/zlint/zlint.cpp +++ b/zlint/zlint.cpp @@ -1,5 +1,5 @@ /* This file is part of the yazpp toolkit. - * Copyright (C) 1998-2012 Index Data and Mike Taylor + * Copyright (C) Index Data * See the file LICENSE for details. */ @@ -14,6 +14,7 @@ #include #include #include +#include #include @@ -149,12 +150,11 @@ IPDU_Observer *Zlint::sessionNotify( Z_ReferenceId *Zlint::mk_refid(const char *buf, int len) { - Z_ReferenceId *id = - (Z_ReferenceId *) odr_malloc(odr_encode(), sizeof(*id)); - id->size = id->len = len; - id->buf = (unsigned char*) odr_malloc(odr_encode(), len); - memcpy(id->buf, buf, len); - return id; + return odr_create_Odr_oct(odr_encode(), +#if YAZ_VERSIONL < 0x50000 + (unsigned char *) +#endif + buf, len); } int Zlint::initResponseGetVersion(Z_InitResponse *init)