libnm: document that some return values are immutable
Document that the GPtrArray returned by - nm_device_get_lldp_neighbors() - nm_ip_config_get_addresses() - nm_ip_config_get_routes() is immutable and can be used by callers without the need of a copy.
This commit is contained in:
@@ -2075,7 +2075,8 @@ NM_BACKPORT_SYMBOL (libnm_1_0_6, NMMetered, nm_device_get_metered, (NMDevice *de
|
||||
*
|
||||
* Returns: (element-type NMLldpNeighbor) (transfer none): the #GPtrArray
|
||||
* containing #NMLldpNeighbor<!-- -->s. This is the internal copy used by the
|
||||
* device and must not be modified.
|
||||
* device and must not be modified. The library never modifies the returned
|
||||
* array and thus it is safe for callers to reference and keep using it.
|
||||
*
|
||||
* Since: 1.2
|
||||
**/
|
||||
|
@@ -406,7 +406,8 @@ nm_ip_config_get_gateway (NMIPConfig *config)
|
||||
*
|
||||
* Returns: (element-type NMIPAddress) (transfer none): the #GPtrArray
|
||||
* containing #NMIPAddress<!-- -->es. This is the internal copy used by the
|
||||
* configuration and must not be modified.
|
||||
* configuration and must not be modified. The library never modifies the
|
||||
* returned array and thus it is safe for callers to reference and keep using it.
|
||||
**/
|
||||
GPtrArray *
|
||||
nm_ip_config_get_addresses (NMIPConfig *config)
|
||||
@@ -491,7 +492,9 @@ nm_ip_config_get_wins_servers (NMIPConfig *config)
|
||||
*
|
||||
* Returns: (element-type NMIPRoute) (transfer none): the #GPtrArray containing
|
||||
* #NMIPRoutes. This is the internal copy used by the configuration, and must
|
||||
* not be modified.
|
||||
* not be modified. The library never modifies the returned array and thus it is
|
||||
* safe for callers to reference and keep using it.
|
||||
*
|
||||
**/
|
||||
GPtrArray *
|
||||
nm_ip_config_get_routes (NMIPConfig *config)
|
||||
|
Reference in New Issue
Block a user