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 <cjihrig@gmail.com>
This commit is contained in:
Ed Schouten 2017-11-26 13:12:09 +01:00 committed by cjihrig
parent 46464dd1b7
commit 0802c81966
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5
3 changed files with 23 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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