Log Message: |
AVRO-741. The avro_give* functions now all take in a custom free function that
will be called once the datum no longer needs access to the underlying
buffer. This gives complete flexibility over wrapping external buffers
into Avro datum instances. The avro_wrap* functions have been removed,
since this is now just a special case — just use NULL for the free
function. To get the previous behavior of avro_give* (where the buffer
is freed using the custom allocator), use avro_alloc_free as the free
function.
In addition to updating the give functions, the binary encoding class
now ensures that any bytes value is NUL terminated in memory. This
fixes the bug in AVRO-741, where we were getting a segfault when trying
to parse a schema JSON directly from a bytes value.
|