diff options
author | Neal H. Walfield <neal@pep.foundation> | 2018-11-21 14:57:54 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2018-11-22 08:55:31 +0100 |
commit | 0fad2b0ab90fc63306cd64be7e9de8524e47a30b (patch) | |
tree | 3be333fb59551fd10c2e2295490ef8bda26dd7f3 /ffi/include | |
parent | e968c1b5a3d1f319f59c2b4d0066fe63d9320473 (diff) |
ffi: Add sq_writer_stack_write_all.
Diffstat (limited to 'ffi/include')
-rw-r--r-- | ffi/include/sequoia/openpgp.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ffi/include/sequoia/openpgp.h b/ffi/include/sequoia/openpgp.h index f09ff1ea..23959b4b 100644 --- a/ffi/include/sequoia/openpgp.h +++ b/ffi/include/sequoia/openpgp.h @@ -955,11 +955,22 @@ sq_writer_stack_t sq_writer_stack_message (sq_writer_t writer); /*/ /// Writes up to `len` bytes of `buf` into `writer`. -o/*/ +/*/ ssize_t sq_writer_stack_write (sq_context_t ctx, sq_writer_stack_t writer, const uint8_t *buf, size_t len); /*/ +/// Writes up to `len` bytes of `buf` into `writer`. +/// +/// Unlike sq_writer_stack_write, unless an error occurs, the whole +/// buffer will be written. Also, this version automatically catches +/// EINTR. +/*/ +sq_status_t sq_writer_stack_write_all (sq_context_t ctx, + sq_writer_stack_t writer, + const uint8_t *buf, size_t len); + +/*/ /// Finalizes this writer, returning the underlying writer. /*/ sq_writer_stack_t sq_writer_stack_finalize_one (sq_context_t ctx, |