The pubsub code has a load of helper functions to build stanzas for various pubsub actions, where the caller can optionally pass addresses to store pointers to the <pubsub> node, the <create> node, etc. Currently they all look like this: WockyXmppStanza * wocky_pubsub_blah_create_foo_stanza ( WockyPubsubBlah *self, WockyPubsubNode **pubsub_node, WockyPubsubNOde **foo_node) { WockyPubsubStanza *stanza; WockyPubsubNode *pubsub, *foo; stanza = build (..., SHOUTY SHOUTY, SHOUTY_ASSIGN_TO, &pubsub, ..... ); if (pubsub_node != NULL) *pubsub_node = pubsub; } It might be nice to let build accept NULL targets, and just not assign in that case. On the flipside, it arguably makes it harder to detect you screwing up.
Actually I just tried this, and it saved, erm, four lines of code. So I think I was wrong.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.