mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-05 12:40:16 +01:00
libnm-core: add internal _nm_ip_route_ref() helper
For some reason, nm_ip_route_ref() does not return the referenced instance, making it cumbersome to use. Add a helper.
This commit is contained in:
parent
a206042eda
commit
302a5cebe4
1 changed files with 7 additions and 0 deletions
|
|
@ -21,6 +21,13 @@
|
|||
#define nm_auto_unref_ip_address nm_auto(_nm_ip_address_unref)
|
||||
NM_AUTO_DEFINE_FCN0(NMIPAddress *, _nm_ip_address_unref, nm_ip_address_unref);
|
||||
|
||||
static inline NMIPRoute *
|
||||
_nm_ip_route_ref(NMIPRoute *route)
|
||||
{
|
||||
nm_ip_route_ref(route);
|
||||
return route;
|
||||
}
|
||||
|
||||
#define nm_auto_unref_ip_route nm_auto(_nm_auto_unref_ip_route)
|
||||
NM_AUTO_DEFINE_FCN0(NMIPRoute *, _nm_auto_unref_ip_route, nm_ip_route_unref);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue