From 1bcdca290d35bfb7a28f855d88a0e6791679ecc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 29 Sep 2016 11:15:04 +0200 Subject: [PATCH] doc: note buffer lifetime requirements in uv_write MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: https://github.com/libuv/libuv/issues/1072 PR-URL: https://github.com/libuv/libuv/pull/1074 Reviewed-By: Saúl Ibarra Corretgé Reviewed-By: Santiago Gimeno Reviewed-By: Colin Ihrig --- docs/src/stream.rst | 4 ++++ 1 file changed, 4 insertions(+) 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