util: xml: use g_auto directly for VIR_XPATH_NODE_AUTORESTORE

Since commit 44e7f02915
    util: rewrite auto cleanup macros to use glib's equivalent

VIR_AUTOCLEAN is just an alias for g_auto. Use the GLib macros
directly instead of our custom aliases.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Ján Tomko 2019-10-15 14:47:50 +02:00
parent 67e72053c1
commit 3372c16aa5
1 changed files with 3 additions and 3 deletions

View File

@ -233,7 +233,7 @@ typedef virXPathContextNodeSave *virXPathContextNodeSavePtr;
void void
virXPathContextNodeRestore(virXPathContextNodeSavePtr save); virXPathContextNodeRestore(virXPathContextNodeSavePtr save);
VIR_DEFINE_AUTOCLEAN_FUNC(virXPathContextNodeSave, virXPathContextNodeRestore); G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(virXPathContextNodeSave, virXPathContextNodeRestore);
/** /**
* VIR_XPATH_NODE_AUTORESTORE: * VIR_XPATH_NODE_AUTORESTORE:
@ -243,7 +243,7 @@ VIR_DEFINE_AUTOCLEAN_FUNC(virXPathContextNodeSave, virXPathContextNodeRestore);
* node pointer is reset to the original value when this macro was used. * node pointer is reset to the original value when this macro was used.
*/ */
#define VIR_XPATH_NODE_AUTORESTORE(_ctxt) \ #define VIR_XPATH_NODE_AUTORESTORE(_ctxt) \
VIR_AUTOCLEAN(virXPathContextNodeSave) _ctxt ## CtxtSave = { .ctxt = _ctxt,\ g_auto(virXPathContextNodeSave) _ctxt ## CtxtSave = { .ctxt = _ctxt,\
.node = _ctxt->node}; \ .node = _ctxt->node}; \
ignore_value(&_ctxt ## CtxtSave) ignore_value(&_ctxt ## CtxtSave)