/* This assignment is needed to avoid a gcc warning */ \
GDestroyNotify _destroy = (GDestroyNotify) (destroy); \
\
- (void) (0 ? (gpointer) *(pp) : 0); \
- do \
- _p = g_atomic_pointer_get (_pp); \
- while G_UNLIKELY (!g_atomic_pointer_compare_and_exchange (_pp, _p, NULL)); \
- \
- if (_p) \
- _destroy (_p); \
+ _p = *_pp; \
+ if (_p) \
+ { \
+ *_pp = NULL; \
+ _destroy (_p); \
+ } \
} G_STMT_END
/* Optimise: avoid the call to the (slower) _n function if we can