Exemplo n.º 1
0
Arquivo: io.c Projeto: Acarus/kaa
int avro_write(avro_writer_t writer, void *buf, int64_t len)
{
    if (buf && len >= 0) {
        return avro_write_memory(writer, buf, len);
    }
    return EINVAL;
}
Exemplo n.º 2
0
Arquivo: io.c Projeto: 1ack/Impala
int avro_write(avro_writer_t writer, void *buf, int64_t len)
{
	if (buf && len >= 0) {
		if (is_memory_io(writer)) {
			return avro_write_memory(avro_writer_to_memory(writer),
						 buf, len);
		} else if (is_file_io(writer)) {
			return avro_write_file(avro_writer_to_file(writer), buf,
					       len);
		}
	}
	return EINVAL;
}