From 0802c81966e551fc31cf8b0a7b7cbff43f95cdd3 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Sun, 26 Nov 2017 13:12:09 +0100 Subject: [PATCH] doc: document UV_*_MAP() macros UV_ERRNO_MAP(), UV_HANDLE_TYPE_MAP(), and UV_REQ_TYPE_MAP() are considered part of the public API. This commit documents them. Fixes: https://github.com/libuv/libuv/issues/1607 PR-URL: https://github.com/libuv/libuv/pull/1653 Reviewed-By: Colin Ihrig --- docs/src/errors.rst | 7 +++++++ docs/src/handle.rst | 8 ++++++++ docs/src/request.rst | 8 ++++++++ 3 files changed, 23 insertions(+) diff --git a/docs/src/errors.rst b/docs/src/errors.rst index 4e30447b..7c3f95d7 100644 --- a/docs/src/errors.rst +++ b/docs/src/errors.rst @@ -323,6 +323,13 @@ Error constants API --- +.. c:function:: UV_ERRNO_MAP(iter_macro) + + Macro that expands to a series of invocations of `iter_macro` for + each of the error constants above. `iter_macro` is invoked with two + arguments: the name of the error constant without the `UV_` prefix, + and the error message string literal. + .. c:function:: const char* uv_strerror(int err) Returns the error message for the given error code. Leaks a few bytes diff --git a/docs/src/handle.rst b/docs/src/handle.rst index cdfb76bf..86fa811d 100644 --- a/docs/src/handle.rst +++ b/docs/src/handle.rst @@ -101,6 +101,14 @@ Public members API --- +.. c:function:: UV_HANDLE_TYPE_MAP(iter_macro) + + Macro that expands to a series of invocations of `iter_macro` for + each of the handle types. `iter_macro` is invoked with two + arguments: the name of the `uv_handle_type` element without the + `UV_` prefix, and the name of the corresponding structure type + without the `uv_` prefix and `_t` suffix. + .. c:function:: int uv_is_active(const uv_handle_t* handle) Returns non-zero if the handle is active, zero if it's inactive. What diff --git a/docs/src/request.rst b/docs/src/request.rst index dac6d7ab..56038287 100644 --- a/docs/src/request.rst +++ b/docs/src/request.rst @@ -53,6 +53,14 @@ Public members API --- +.. c:function:: UV_REQ_TYPE_MAP(iter_macro) + + Macro that expands to a series of invocations of `iter_macro` for + each of the request types. `iter_macro` is invoked with two + arguments: the name of the `uv_req_type` element without the `UV_` + prefix, and the name of the corresponding structure type without the + `uv_` prefix and `_t` suffix. + .. c:function:: int uv_cancel(uv_req_t* req) Cancel a pending request. Fails if the request is executing or has finished