From: Richard Jones Date: Tue, 18 Aug 2009 08:16:56 +0000 (+0100) Subject: generator: Small code rearrangement. X-Git-Tag: 1.0.68~24 X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=commitdiff_plain;h=a75756628f7e822da29b3728ec8e949c60c5cc3f generator: Small code rearrangement. Move code which updates pod2text memo file into a separate function. --- diff --git a/src/generator.ml b/src/generator.ml index 08c28fc..cc97dd5 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. *)