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.
This commit is contained in:
@@ -29,8 +29,8 @@
|
|||||||
<funcdef>int <function>sd_bus_message_read_array</function></funcdef>
|
<funcdef>int <function>sd_bus_message_read_array</function></funcdef>
|
||||||
<paramdef>sd_bus_message *<parameter>m</parameter></paramdef>
|
<paramdef>sd_bus_message *<parameter>m</parameter></paramdef>
|
||||||
<paramdef>char <parameter>type</parameter></paramdef>
|
<paramdef>char <parameter>type</parameter></paramdef>
|
||||||
<paramdef>const void **<parameter>ptr</parameter></paramdef>
|
<paramdef>const void **<parameter>ret_ptr</parameter></paramdef>
|
||||||
<paramdef>size_t *<parameter>size</parameter></paramdef>
|
<paramdef>size_t *<parameter>ret_size</parameter></paramdef>
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
@@ -38,16 +38,16 @@
|
|||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para><function>sd_bus_message_read_array()</function> provides access to an array elements in the
|
<para><function>sd_bus_message_read_array()</function> provides access to an array of elements in the
|
||||||
bus message <parameter>m</parameter>. The "read pointer" in the message must be right before an array of type
|
bus message <parameter>m</parameter>. The "read pointer" in the message must be right before an array of
|
||||||
<parameter>type</parameter>. As a special case, <parameter>type</parameter> may be
|
type <parameter>type</parameter>. A pointer to the array data is returned in the parameter
|
||||||
<constant>NUL</constant>, in which case any trivial type is acceptable. A pointer to the array data is returned
|
<parameter>ret_ptr</parameter> and the size of the array data (in bytes) is returned in the parameter
|
||||||
in the parameter <parameter>ptr</parameter> and the size of array data (in bytes) is returned in the
|
<parameter>ret_size</parameter>. If this returns a positive value and the returned
|
||||||
parameter <parameter>size</parameter>. If the returned <parameter>size</parameter> parameter is 0, a
|
<parameter>ret_size</parameter> is 0, a valid non-<constant>NULL</constant> pointer will be returned as
|
||||||
valid non-null pointer will be returned as <parameter>ptr</parameter>, but it may not be
|
<parameter>ret_ptr</parameter>, but it may not be dereferenced. The data is aligned as appropriate for
|
||||||
dereferenced. The data is aligned as appropriate for the data type. The data is part of the message — it
|
the data type. The data is part of the message — it may not be modified and is valid only as long as the
|
||||||
may not be modified and is valid only as long as the message is referenced. After this function returns,
|
message is referenced. If this returns a positive value, the "read pointer" points at the next element
|
||||||
the "read pointer" points at the next element after the array.</para>
|
after the array.</para>
|
||||||
|
|
||||||
<para>Note that this function only supports arrays of trivial types, i.e. arrays of booleans, the various
|
<para>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,
|
integer types, as well as floating point numbers. In particular it may not be used for arrays of strings,
|
||||||
|
|||||||
Reference in New Issue
Block a user