- 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);