mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-09-06 09:04:55 +00:00
tests: add nmtstc_auto_service_cleanup macro
This commit is contained in:
parent
42b0bef33c
commit
e2ef7cad57
|
@ -48,9 +48,11 @@ static inline void _nmtstc_auto_service_cleanup (NMTstcServiceInfo **info)
|
|||
{
|
||||
nmtstc_service_cleanup (g_steal_pointer (info));
|
||||
}
|
||||
#define nmtstc_auto_service_cleanup nm_auto(_nmtstc_auto_service_cleanup)
|
||||
|
||||
#define NMTSTC_SERVICE_INFO_SETUP(sinfo) \
|
||||
NM_PRAGMA_WARNING_DISABLE ("-Wunused-variable") \
|
||||
__attribute__ ((cleanup(_nmtstc_auto_service_cleanup))) NMTstcServiceInfo *sinfo = ({ \
|
||||
nmtstc_auto_service_cleanup NMTstcServiceInfo *sinfo = ({ \
|
||||
NMTstcServiceInfo *_sinfo; \
|
||||
\
|
||||
_sinfo = nmtstc_service_init (); \
|
||||
|
|
Loading…
Reference in a new issue