diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2010-04-10 01:18:31 +0100 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2010-04-13 15:22:14 +0100 |
commit | 4e1c0ad275c1a7c3cb4f225e845cac73ab10ffb7 (patch) | |
tree | ea5779cc60887c331b1685312c5c5b866db3a4fb /wocky/wocky-pep-service.c | |
parent | 6fb6e88edc7542a209e547796f5827a6af0af5be (diff) |
Use G_GNUC_NULL_TERMINATED for build spec-cy functions
Unfortunately, the functions' previous signatures were awkward for
NULL-termination: because the first tag in the specification was an
explicit non-pointer argument, if you didn't actually want the stanza to
have a body you had to say:
wocky_xmpp_stanza_build_iq_result (..., WOCKY_STANZA_END, NULL);
You couldn't use NULL in place of WOCKY_STANZA_END because WockyBuildTag
isn't a pointer type; and you couldn't omit it because then the varargs
aren't NULL-terminated. So, this patch removes the explicit first tag
argument. While this may be slightly worse from a documentation point of
view, I think it's better than having to document the special case
above.
Diffstat (limited to 'wocky/wocky-pep-service.c')
-rw-r--r-- | wocky/wocky-pep-service.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wocky/wocky-pep-service.c b/wocky/wocky-pep-service.c index d6173ec..e534e23 100644 --- a/wocky/wocky-pep-service.c +++ b/wocky/wocky-pep-service.c @@ -264,7 +264,7 @@ wocky_pep_service_start (WockyPepService *self, WOCKY_NODE_ATTRIBUTE, "node", priv->node, WOCKY_NODE_END, WOCKY_NODE_END, - WOCKY_STANZA_END); + NULL); /* TODO: subscribe to node if needed */ } @@ -323,7 +323,7 @@ wocky_pep_service_get_async (WockyPepService *self, WOCKY_NODE, "items", WOCKY_NODE_ATTRIBUTE, "node", priv->node, WOCKY_NODE_END, - WOCKY_NODE_END, WOCKY_STANZA_END); + WOCKY_NODE_END, NULL); result = g_simple_async_result_new (G_OBJECT (self), callback, user_data, wocky_pep_service_get_finish); |