[Libguestfs] [PATCH v2 4/4] common/mltools: xpath_helpers: Get rid of xpath_*_default functions.

Pino Toscano ptoscano at redhat.com
Thu Oct 12 13:52:57 UTC 2017


On Sunday, 8 October 2017 23:26:56 CEST Richard W.M. Jones wrote:
> Instead of using ‘xpath_(string|int|int64)_default’ we can write the
> equivalent code using ‘Option.default’.  This is not quite so concise,
> but may be easier to understand.
> 
> eg:
>   xpath_int_default xctx "xpath_expr" 10
> ->
>   Option.default 10 (xpath_int xctx "xpath_expr")
> ---

LGTM.

Thanks,
-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20171012/095f78b1/attachment.sig>


More information about the Libguestfs mailing list