[libvirt] [PATCH 4/5] util: XML: Introduce automatic reset of XPath's current node

Ján Tomko jtomko at redhat.com
Wed Feb 27 13:45:44 UTC 2019


On Tue, Feb 26, 2019 at 06:08:11PM +0100, Peter Krempa wrote:
>Quite a few parts modify the XPath context current node to shif the

shift

>scope and allow easier queries. This also means that the node needs
>to be restored afterwards.
>
>Introduce a macro based on 'VIR_AUTOCLEAN' which adds a local structure
>on the stack remembering the original node along with a function which
>will make sure that the node is reset when the local structure leaves
>scope.
>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/libvirt_private.syms |  1 +
> src/util/virxml.c        | 10 ++++++++++
> src/util/virxml.h        | 22 ++++++++++++++++++++++
> 3 files changed, 33 insertions(+)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190227/2893cc32/attachment-0001.sig>


More information about the libvir-list mailing list