From a75756628f7e822da29b3728ec8e949c60c5cc3f Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Tue, 18 Aug 2009 09:16:56 +0100 Subject: [PATCH] generator: Small code rearrangement. Move code which updates pod2text memo file into a separate function. --- src/generator.ml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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. *) -- 1.8.3.1