mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-02 10:00:13 +01:00
shared: add nm_unauto() helper macro
This commit is contained in:
parent
a50d28d4dd
commit
0330a55851
1 changed files with 12 additions and 0 deletions
|
|
@ -315,6 +315,18 @@ _notify (obj_type *obj, _PropertyEnums prop) \
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define nm_unauto(pp) \
|
||||
({ \
|
||||
G_STATIC_ASSERT (sizeof *(pp) == sizeof (gpointer)); \
|
||||
gpointer *_pp = (gpointer *) (pp); \
|
||||
gpointer _p = *_pp; \
|
||||
\
|
||||
*_pp = NULL; \
|
||||
_p; \
|
||||
})
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline gpointer
|
||||
nm_g_object_ref (gpointer obj)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue