diff options
author | Vladimír Čunát <vladimir.cunat@nic.cz> | 2016-09-29 11:15:04 +0200 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2016-10-09 13:00:09 -0400 |
commit | 1bcdca290d35bfb7a28f855d88a0e6791679ecc2 (patch) | |
tree | 8c5ff52e1cc3c43b04dc1585048eb94d8249fa09 /docs/src | |
parent | 8221f9b305c09205be575d8d34a5c493ba03d392 (diff) | |
download | libuv-1bcdca290d35bfb7a28f855d88a0e6791679ecc2.tar.gz libuv-1bcdca290d35bfb7a28f855d88a0e6791679ecc2.zip |
doc: note buffer lifetime requirements in uv_write
Fixes: https://github.com/libuv/libuv/issues/1072
PR-URL: https://github.com/libuv/libuv/pull/1074
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'docs/src')
-rw-r--r-- | docs/src/stream.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/src/stream.rst b/docs/src/stream.rst index 7989cd4f..de492b35 100644 --- a/docs/src/stream.rst +++ b/docs/src/stream.rst @@ -173,6 +173,10 @@ API uv_write(&req1, stream, a, 2, cb); uv_write(&req2, stream, b, 2, cb); + .. note:: + The memory pointed to by the buffers must remain valid until the callback gets called. + This also holds for :c:func:`uv_write2`. + .. c:function:: int uv_write2(uv_write_t* req, uv_stream_t* handle, const uv_buf_t bufs[], unsigned int nbufs, uv_stream_t* send_handle, uv_write_cb cb) Extended write function for sending handles over a pipe. The pipe must be |