search for: rstructs_used

Displaying 4 results from an estimated 4 matches for "rstructs_used".

Did you mean: rstructs_used_t
2009 Aug 17
1
[PATCH libguestfs] generator.ml: do not emit unused print_* functions
...; print_%s_indent (%s, \"\");\n" typ typ; - pr "}\n"; - pr "\n"; ) structs; (* Emit a print_TYPE_list function definition only if that function is used. *) @@ -6145,6 +6140,18 @@ and generate_fish_cmds () = | typ, _ -> () (* empty *) ) rstructs_used; + (* Emit a print_TYPE function definition only if that function is used. *) + List.iter ( + function + | typ, RStructOnly -> + pr "static void print_%s (struct guestfs_%s *%s)\n" typ typ typ; + pr "{\n"; + pr " print_%s_indent (%s, \&quot...
2009 Aug 14
1
Code snippet to work out which RStruct/RStructList structs are used and how
...(+), 0 deletions(-) diff --git a/src/generator.ml b/src/generator.ml index b8f9ace..b76f502 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -3645,6 +3645,64 @@ let java_structs = [ "inotify_event", "INotifyEvent"; ] +(* What structs are actually returned. *) +type rstructs_used_t = RStructOnly | RStructListOnly | RStructAndList + +(* Returns a list of RStruct/RStructList structs that are returned + * by any function. Each element of returned list is a pair: + * + * (structname, RStructOnly) + * == there exists function which returns RStruct (_, structname) + * (struct...
2009 Aug 17
2
[PATCH libguestfs] generator.ml: do not emit unused print_*_list functions
...) 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> actions *) List.iter ( fun (name, style, _, flags, _, _, _) -> -- 1.6.4.378.g88f2f
2009 Aug 28
1
[PATCHES] avoid more warnings
...ructs; + (* Emit a copy_TYPE_list function definition only if that function is used. *) + List.iter ( + function + | typ, (RStructListOnly | RStructAndList) -> + (* generate the function for typ *) + emit_ocaml_copy_list_function typ + | typ, _ -> () (* empty *) + ) rstructs_used; + (* The wrappers. *) List.iter ( fun (name, style, _, _, _, _, _) -> -- 1.6.4.1.373.g81fb2 >From de81a7d930a6a2ad558eff9396da20237e06ccc1 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering at redhat.com> Date: Fri, 28 Aug 2009 14:07:35 +0200 Subject: [PATCH libguestfs...