Displaying 3 results from an estimated 3 matches for "put_type_list".
Did you mean:
par_type_list
2009 Aug 14
1
Code snippet to work out which RStruct/RStructList structs are used and how
--
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
-------------- next part --------------
>From 9efa77d717bd9bba5f61965eb6920429b7ae5d8e Mon Sep 17 00:00:00 2001
From: Richard W.M. Jones
2009 Aug 17
2
[PATCH libguestfs] generator.ml: do not emit unused print_*_list functions
...uot;[%%d] = {\\n\", i);\n";
- pr " print_%s_indent (&%ss->val[i], \" \");\n" typ typ;
- pr " printf (\"}\\n\");\n";
- pr " }\n";
- pr "}\n";
- pr "\n";
) structs;
+ (* Emit a put_TYPE_list function definition only if that function is used. *)
+ List.iter (
+ function
+ | typ, (RStructListOnly | RStructAndList) ->
+ (* generate the function for typ *)
+ emit_print_list_function typ
+ | typ, _ -> () (* empty *)
+ ) rstructs_used;
+
(* run_<action>...
2013 Jan 30
1
[PATCH] Make internal-only functions and structures private
...";
diff --git a/generator/python.ml b/generator/python.ml
index 5bfb1b1..3863c71 100644
--- a/generator/python.ml
+++ b/generator/python.ml
@@ -240,7 +240,7 @@ free_strings (char **argv)
pr "};\n";
pr "\n";
- ) structs;
+ ) external_structs;
(* Emit a put_TYPE_list function definition only if that function is used. *)
List.iter (
diff --git a/generator/structs.ml b/generator/structs.ml
index 207da90..da52dfe 100644
--- a/generator/structs.ml
+++ b/generator/structs.ml
@@ -26,6 +26,7 @@ type struc = {
s_name : string;
s_cols : cols;
s_camel_name :...