Commit graph

7 commits

Author SHA1 Message Date
Thomas Haller
7028c8a53f utils: add nm_clear_g_source() helper
Utility function to simplify the following common code:

    if (priv->timeout_id) {
        g_source_remove (priv->timeout_id);
        priv->timeout_id = 0;
    }

to

    nm_clear_g_source (&priv->timeout_id);

(cherry picked from commit b5beaef8fa)
2015-04-28 18:39:52 +02:00
Thomas Haller
d1c79fbe93 all: add macro NM_DEFINE_SINGLETON_GETTER()
(cherry picked from commit e725887c3a)
2015-03-13 11:50:50 +01:00
Thomas Haller
dfb25b6c4a all: move STRLEN() macro to global header nm-utils-internal.h
https://bugzilla.gnome.org/show_bug.cgi?id=741651
(cherry picked from commit 422fbf48b9)
2014-12-18 17:38:35 +01:00
Thomas Haller
6a59ab0b86 all: add macro NM_IN_SET
Copied from systemd's macro IN_SET from /src/shared/macro.h

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-11-07 15:19:05 +01:00
Thomas Haller
e2179f0911 all: add macros to suppress compiler warnings
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-31 21:00:50 +01:00
Thomas Haller
65c43a680e utils: add _NM_UTILS_MACRO_FIRST and _NM_UTILS_MACRO_REST macros
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-01 19:06:24 +02:00
Thomas Haller
9f832d99be core: add project-wide header file nm-utils-internal.h
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-01 19:06:24 +02:00