Displaying 3 results from an estimated 3 matches for "ab176351f".
2017 Apr 04
1
Re: [PATCH v5 09/10] mllib: add XPath helper xpath_get_nodes()
...to not use a list reference to collect the nodes would
be to use a tail-recursive function to iterate the xpathobj nodes, but
IMHO would be more complicated than actually needed.
> + done;
> + !nodes
> diff --git a/mllib/xpath_helpers.mli b/mllib/xpath_helpers.mli
> index 7434ba645..ab176351f 100644
> --- a/mllib/xpath_helpers.mli
> +++ b/mllib/xpath_helpers.mli
> @@ -31,3 +31,7 @@ val xpath_int_default : Xml.xpathctx -> string -> int -> int
> val xpath_int64_default : Xml.xpathctx -> string -> int64 -> int64
> (** Parse an xpath expression and return...
2017 Mar 23
0
[PATCH v5 09/10] mllib: add XPath helper xpath_get_nodes()
...Xml.xpath_eval_expression xpathctx expr in
+ let nodes = ref [] in
+ for i = 0 to Xml.xpathobj_nr_nodes obj - 1 do
+ let node = Xml.xpathobj_node obj i in
+ nodes := List.append !nodes [node]
+ done;
+ !nodes
diff --git a/mllib/xpath_helpers.mli b/mllib/xpath_helpers.mli
index 7434ba645..ab176351f 100644
--- a/mllib/xpath_helpers.mli
+++ b/mllib/xpath_helpers.mli
@@ -31,3 +31,7 @@ val xpath_int_default : Xml.xpathctx -> string -> int -> int
val xpath_int64_default : Xml.xpathctx -> string -> int64 -> int64
(** Parse an xpath expression and return a string/int; if the expr...
2017 Mar 23
13
[PATCH v5 00/10] Introducing virt-builder-repository
Hi all,
Here is the v5 of my patches series applying the latest comments
from Pino.
Cédric Bosdonnat (10):
lib/osinfo.c: Extract xml processing into a callback
lib: extract osinfo DB traversing API
mllib: ocaml wrapper for lib/osinfo
builder: rename docs test script
builder: add a template parameter to get_index
builder: add Index.write_entry function
dib: move do_cp to