mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-11 07:30:16 +01:00
core: declare nm_session_monitor_get() using NM_DEFINE_SINGLETON_GETTER()
This commit is contained in:
parent
22409e0481
commit
d8887019ce
1 changed files with 2 additions and 9 deletions
|
|
@ -278,16 +278,9 @@ ck_finalize (NMSessionMonitor *monitor)
|
|||
|
||||
/********************************************************************/
|
||||
|
||||
static NMSessionMonitor *
|
||||
nm_session_monitor_get (void)
|
||||
{
|
||||
static NMSessionMonitor *singleton = NULL;
|
||||
NMSessionMonitor *nm_session_monitor_get(void);
|
||||
|
||||
if (!singleton)
|
||||
singleton = NM_SESSION_MONITOR (g_object_new (NM_TYPE_SESSION_MONITOR, NULL));
|
||||
|
||||
return singleton;
|
||||
}
|
||||
NM_DEFINE_SINGLETON_GETTER (NMSessionMonitor, nm_session_monitor_get, NM_TYPE_SESSION_MONITOR);
|
||||
|
||||
/**
|
||||
* nm_session_monitor_connect:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue