for (i = 0; i<otherInformation->num_elements; i++)
newlist[i] = otherInformation->list[i];
otherInformation->list = newlist;
for (i = 0; i<otherInformation->num_elements; i++)
newlist[i] = otherInformation->list[i];
otherInformation->list = newlist;
otherInformation->list[i] = (Z_OtherInformationUnit*)
odr_malloc (odr, sizeof(Z_OtherInformationUnit));
if (oid)
{
otherInformation->list[i]->category = (Z_InfoCategory*)
odr_malloc (odr, sizeof(Z_InfoCategory));
otherInformation->list[i] = (Z_OtherInformationUnit*)
odr_malloc (odr, sizeof(Z_OtherInformationUnit));
if (oid)
{
otherInformation->list[i]->category = (Z_InfoCategory*)
odr_malloc (odr, sizeof(Z_InfoCategory));
- otherInformation->list[i]->category->categoryValue = (int*)
- odr_malloc (odr, sizeof(int));
- *otherInformation->list[i]->category->categoryValue =
- categoryValue;
+ otherInformation->list[i]->category->categoryValue =
+ odr_intdup(odr, categoryValue);
}
else
otherInformation->list[i]->category = 0;
otherInformation->list[i]->which = Z_OtherInfo_characterInfo;
otherInformation->list[i]->information.characterInfo = 0;
}
else
otherInformation->list[i]->category = 0;
otherInformation->list[i]->which = Z_OtherInfo_characterInfo;
otherInformation->list[i]->information.characterInfo = 0;
void yaz_oi_set_string_oid (
Z_OtherInformation **otherInformation, ODR odr,
void yaz_oi_set_string_oid (
Z_OtherInformation **otherInformation, ODR odr,
char *yaz_oi_get_string_oid (
Z_OtherInformation **otherInformation,
char *yaz_oi_get_string_oid (
Z_OtherInformation **otherInformation,
if ((oi = yaz_oi_update(otherInformation, 0, oid, categoryValue,
delete_flag)) &&
oi->which == Z_OtherInfo_characterInfo)
if ((oi = yaz_oi_update(otherInformation, 0, oid, categoryValue,
delete_flag)) &&
oi->which == Z_OtherInfo_characterInfo)