From 8787df83fe3ab1f63273c4763a9cbb7f192a3edd Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 16 Sep 2026 11:47:12 +0900 Subject: [PATCH] man: several fixlets for documentation of sd_bus_message_read_array() - It does not accept NUL for type. - ret_size is zero and ret_ptr is non-NULL when it returns positive. - Fixed argument names: ptr -> ret_ptr, size -> ret_size. --- man/sd_bus_message_read_array.xml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/man/sd_bus_message_read_array.xml b/man/sd_bus_message_read_array.xml index 9df1e1c8e6..b8c64a6832 100644 --- a/man/sd_bus_message_read_array.xml +++ b/man/sd_bus_message_read_array.xml @@ -29,8 +29,8 @@ int sd_bus_message_read_array sd_bus_message *m char type - const void **ptr - size_t *size + const void **ret_ptr + size_t *ret_size @@ -38,16 +38,16 @@ Description - sd_bus_message_read_array() provides access to an array elements in the - bus message m. The "read pointer" in the message must be right before an array of type - type. As a special case, type may be - NUL, in which case any trivial type is acceptable. A pointer to the array data is returned - in the parameter ptr and the size of array data (in bytes) is returned in the - parameter size. If the returned size parameter is 0, a - valid non-null pointer will be returned as ptr, but it may not be - dereferenced. The data is aligned as appropriate for the data type. The data is part of the message — it - may not be modified and is valid only as long as the message is referenced. After this function returns, - the "read pointer" points at the next element after the array. + sd_bus_message_read_array() provides access to an array of elements in the + bus message m. The "read pointer" in the message must be right before an array of + type type. A pointer to the array data is returned in the parameter + ret_ptr and the size of the array data (in bytes) is returned in the parameter + ret_size. If this returns a positive value and the returned + ret_size is 0, a valid non-NULL pointer will be returned as + ret_ptr, but it may not be dereferenced. The data is aligned as appropriate for + the data type. The data is part of the message — it may not be modified and is valid only as long as the + message is referenced. If this returns a positive value, the "read pointer" points at the next element + after the array. Note that this function only supports arrays of trivial types, i.e. arrays of booleans, the various integer types, as well as floating point numbers. In particular it may not be used for arrays of strings,