core: declare nm_session_monitor_get() using NM_DEFINE_SINGLETON_GETTER()

This commit is contained in:
Thomas Haller 2015-01-06 11:50:41 +01:00
parent 22409e0481
commit d8887019ce

View file

@ -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: