summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Jones <rjones@trick.home.annexia.org>2009-08-18 09:16:56 +0100
committerRichard Jones <rjones@trick.home.annexia.org>2009-08-18 09:17:52 +0100
commita75756628f7e822da29b3728ec8e949c60c5cc3f (patch)
tree9e393af3bd7f757d414305cda4fed69ed1fa77dd
parent9c5f05ec14655195fc94dc7c72d132087abe634b (diff)
downloadlibguestfs-a75756628f7e822da29b3728ec8e949c60c5cc3f.tar.gz
libguestfs-a75756628f7e822da29b3728ec8e949c60c5cc3f.tar.xz
libguestfs-a75756628f7e822da29b3728ec8e949c60c5cc3f.zip
generator: Small code rearrangement.
Move code which updates pod2text memo file into a separate function.
-rwxr-xr-xsrc/generator.ml8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/generator.ml b/src/generator.ml
index 08c28fc7..cc97dd5a 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -3822,6 +3822,10 @@ let pod2text_memo : ((int * string * string), string list) Hashtbl.t =
v
with
_ -> Hashtbl.create 13
+let pod2text_memo_updated () =
+ let chan = open_out pod2text_memo_filename in
+ output_value chan pod2text_memo;
+ close_out chan
(* Useful functions.
* Note we don't want to use any external OCaml libraries which
@@ -7972,9 +7976,7 @@ and pod2text ~width name longdesc =
failwithf "pod2text: process signalled or stopped by signal %d" i
);
Hashtbl.add pod2text_memo key lines;
- let chan = open_out pod2text_memo_filename in
- output_value chan pod2text_memo;
- close_out chan;
+ pod2text_memo_updated ();
lines
(* Generate ruby bindings. *)