diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2011-02-24 11:18:15 +0000 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2011-03-15 17:59:21 +0000 |
commit | 367d9b96f7bf449ce034684dd4c4a79bd669ac84 (patch) | |
tree | e20235b2bcaeb6be5341a52b668bc97064a9b904 /telepathy-glib/util.c | |
parent | a08b10e66c516bfcbc20428c2657363d035f8ef9 (diff) | |
download | telepathy-glib-367d9b96f7bf449ce034684dd4c4a79bd669ac84.tar.gz |
Make tp_clear_* less NULL-safe.
Previously tp_clear_object (NULL) was permitted. This upsets GCC 4.6,
which (quite reasonably) complained that
if (&object != NULL)
is redundant. The joy of macros. I grepped tp-glib and Gabble, and can't
find *any* cases where anything other than &variable is passed to these
macros. Since this is an unstable branch, let's just change this.
Diffstat (limited to 'telepathy-glib/util.c')
-rw-r--r-- | telepathy-glib/util.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/telepathy-glib/util.c b/telepathy-glib/util.c index 039f216f3..edb431e07 100644 --- a/telepathy-glib/util.c +++ b/telepathy-glib/util.c @@ -1284,8 +1284,7 @@ tp_weak_ref_destroy (TpWeakRef *self) /** * tp_clear_object: (skip) - * @op: (allow-none): a pointer to a variable, struct member etc. holding a - * #GObject + * @op: a pointer to a variable, struct member etc. holding a #GObject * * Set a variable holding a #GObject to %NULL. If it was not already %NULL, * unref the object it previously pointed to. @@ -1298,8 +1297,7 @@ tp_weak_ref_destroy (TpWeakRef *self) /** * tp_clear_pointer: (skip) - * @pp: (allow-none): a pointer to a variable, struct member etc. holding a - * pointer + * @pp: a pointer to a variable, struct member etc. holding a pointer * @destroy: a function to which a gpointer can be passed, to destroy *@pp * (if calling this macro from C++, explicitly casting the function to * #GDestroyNotify may be necessary) @@ -1307,7 +1305,7 @@ tp_weak_ref_destroy (TpWeakRef *self) * Set a variable holding a pointer to %NULL. If it was not already %NULL, * unref or destroy the object it previously pointed to with @destroy. * - * More precisely, if both @pp and *@pp are non-%NULL, set *@pp to %NULL, then + * More precisely, if *@pp is non-%NULL, set *@pp to %NULL, then * call @destroy on the object that *@pp previously pointed to. * * This is analogous to g_clear_error() for non-error objects, but also @@ -1338,14 +1336,13 @@ tp_weak_ref_destroy (TpWeakRef *self) /** * tp_clear_boxed: (skip) * @gtype: (type GObject.Type): the #GType of *@pp, e.g. %G_TYPE_HASH_TABLE - * @pp: (allow-none): a pointer to a variable, struct member etc. holding a - * boxed object + * @pp: a pointer to a variable, struct member etc. holding a boxed object * * Set a variable holding a boxed object to %NULL. If it was not already %NULL, * destroy the boxed object it previously pointed to, as appropriate for * @gtype. * - * More precisely, if both @pp and *@pp are non-%NULL, set *@pp to %NULL, then + * More precisely, if *@pp is non-%NULL, set *@pp to %NULL, then * call g_boxed_free() on the object that *@pp previously pointed to. * * This is similar to tp_clear_pointer(); see that function's documentation |