From 3372c16aa5580b6587621cbf9c95bb5dcc98db04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Tue, 15 Oct 2019 14:47:50 +0200 Subject: [PATCH] util: xml: use g_auto directly for VIR_XPATH_NODE_AUTORESTORE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since commit 44e7f029159ed701b4a1739ac711507ee53790ed 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 Reviewed-by: Michal Privoznik --- src/util/virxml.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/virxml.h b/src/util/virxml.h index c7def9ce61..8813e31f75 100644 --- a/src/util/virxml.h +++ b/src/util/virxml.h @@ -233,7 +233,7 @@ typedef virXPathContextNodeSave *virXPathContextNodeSavePtr; void virXPathContextNodeRestore(virXPathContextNodeSavePtr save); -VIR_DEFINE_AUTOCLEAN_FUNC(virXPathContextNodeSave, virXPathContextNodeRestore); +G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(virXPathContextNodeSave, virXPathContextNodeRestore); /** * VIR_XPATH_NODE_AUTORESTORE: @@ -243,8 +243,8 @@ VIR_DEFINE_AUTOCLEAN_FUNC(virXPathContextNodeSave, virXPathContextNodeRestore); * node pointer is reset to the original value when this macro was used. */ #define VIR_XPATH_NODE_AUTORESTORE(_ctxt) \ - VIR_AUTOCLEAN(virXPathContextNodeSave) _ctxt ## CtxtSave = { .ctxt = _ctxt,\ - .node = _ctxt->node}; \ + g_auto(virXPathContextNodeSave) _ctxt ## CtxtSave = { .ctxt = _ctxt,\ + .node = _ctxt->node}; \ ignore_value(&_ctxt ## CtxtSave) VIR_DEFINE_AUTOPTR_FUNC(xmlDoc, xmlFreeDoc); -- GitLab